Whitespace significant CSS to regular CSS. Typically used for Rework, however you may use it on its own if you like.
$ npm install css-whitespace
$ component install visionmedia/css-whitespace
var compile = require('css-whitespace');
var css = compile('body\n color: #888\n');
@charset "utf-8"
@import "foo.css"
body
padding: 50px
background: black
color: white
form
button
border-radius: 5px
padding: 5px 10px
@media print
body
padding: 0
button
border-radius: 0
width: 100%
yields:
@charset "utf-8";
@import "foo.css";
body {
padding: 50px;
background: black;
color: white;
}
form button {
border-radius: 5px;
padding: 5px 10px;
}
@media print {
body {
padding: 0;
}
button {
border-radius: 0;
width: 100%;
}
}
MIT