npm install beautify-cssYou can install it with npm install [-g] beautify-css.
beautify-css [options] [input] [output]Options:
--indent, -i indent with this number of spaces (or string)
--encoding, -e string encoding (default: "utf8")
--compress, -c compress output, removing whitespace and comments
--source-map generate a source map, and write it to this file
--source-in reference one or more input source maps
--in-place, -p modify the input file in place
-v output helpful debugging messages
`Some examples:
`sh
read from and write to files
beautify-css ugly.css pretty.cssor you can use the --in-place/-p to overwrite the file
(remember to back it up or check it in first!)
beautify-css -p style.cssread ugly css from stdin, write to a filename
echo 'body{margin:0}' | beautify-css - pretty.css
or redirect stdout to a file
echo 'body{margin:0}' | beautify-css > pretty.csspipe pretty css to another tool, such as
myth:
echo 'body{margin:0}' | beautify-css | myth > beautiful.css
``