#CONVERTS .JSON FILE TO .CSS FILE
const jsonToCss = require('json-2-css')
jsonToCss(inputfile.json,outputfile.css)
The .json file has to be in this format for this to work :
{
"selector1": {
"property1.1":"value1.1",
"propery1.2":"value1.2"
},
"selector2": {
"property2.1":"value2.1"
}
}
Trailing commas cause an error, be sure to remove them
The output .css file will contain
selector1 {
property1.1: value1.1;
propery1.2: value1.2;
}
selector2 {
property2.1: value2.1;
}