Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/gko/beautify
- Owner: gko
- License: other
- Created: 2016-10-02T22:22:53.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-02-27T16:35:43.000Z (over 5 years ago)
- Last Synced: 2024-09-21T10:23:06.496Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 10.7 KB
- Stars: 10
- Watchers: 3
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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