Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gko/beautify

💇 Beautify CSS/JS/JSON/HTML/XML formats
https://github.com/gko/beautify

Last synced: 4 days ago
JSON representation

💇 Beautify CSS/JS/JSON/HTML/XML formats

Awesome Lists containing this project

README

        

# Beautify
![build](https://travis-ci.org/gko/beautify.svg?branch=master)
[![Dependency Status](https://www.versioneye.com/user/projects/57f1c07b9907da004fa9a784/badge.svg?style=flat-square)](https://www.versioneye.com/user/projects/57f1c07b9907da004fa9a784)
[![npm version](https://badge.fury.io/js/beautify.svg)](https://badge.fury.io/js/beautify)

Beautify CSS/JS/JSON/HTML/XML formats

## Installation

```bash
npm i beautify -g
```

## Usage

beautify [options]:

-h, --help output usage information

-V, --version output the version number

-f, --format input format.(optional) json/xml/html/js/css

-o, --output output file or folder

examples:
```bash
beautify -o output.html ./test.html
```

```bash
curl -L https://raw.githubusercontent.com/gko/beautify/master/test/mock/test1.json | beautify
```

```bash
echo 'body{width: "200px"}' | beautify -f css
```

You can also use it from node:

```javascript
const beautify = require('beautify');

beautify(`{"a":1}`, {format: 'json'})
```

## Tests

To run tests you simply need to do:
```bash
npm run test
```

## License

[MIT](http://opensource.org/licenses/MIT)

Copyright (c) 2016 Konstantin Gorodinskiy