https://github.com/stoyan/prettyugly
Prettify or uglify CSS code
https://github.com/stoyan/prettyugly
Last synced: about 1 year ago
JSON representation
Prettify or uglify CSS code
- Host: GitHub
- URL: https://github.com/stoyan/prettyugly
- Owner: stoyan
- Created: 2014-06-20T03:16:46.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-06-24T23:21:43.000Z (almost 12 years ago)
- Last Synced: 2025-03-26T23:03:05.086Z (about 1 year ago)
- Language: JavaScript
- Size: 168 KB
- Stars: 6
- Watchers: 5
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
- awesome-wpo-chinese - Prettyugly - Uglify (strip spaces) or prettify (add consistent spaces) CSS code. (Minifiers - JS & CSS)
- awesome-wpo - Prettyugly - Uglify (strip spaces) or prettify (add consistent spaces) CSS code. (Minifiers - JS & CSS / Meetups)
- fucking-awesome-wpo - Prettyugly - Uglify (strip spaces) or prettify (add consistent spaces) CSS code. (Minifiers - JS & CSS / Meetups)
- awesome-wpo-dup - Prettyugly - Uglify (strip spaces) or prettify (add consistent spaces) CSS code. (Minifiers - JS & CSS)
README
Uglify (strip spaces) or prettify (add consistent spaces) CSS code
"Ambition makes you look pretty ugly..."
~ Radiohead, Paranoid Android
## Installation
$ npm install prettyugly
## Usage
```js
var prettyugly = require('../index.js');
var css =
'a {background : red ; color: blue}';
var ugly = prettyugly.ugly(css);
var pretty = prettyugly.pretty(css);
```
The pretty result:
```css
a {
background: red;
color: blue;
}
```
The ugly:
```css
a{background:red;color:blue}
```
## CLI
$ prettyugly pretty stuffs/example.css
$ prettyugly ugly stuffs/example.css
## Playground
Available at http://prettyugly.csspatterns.com