1.0.2 • Published 6 years ago

json-2-css v1.0.2

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

#CONVERTS .JSON FILE TO .CSS FILE

USE

const jsonToCss = require('json-2-css')

jsonToCss(inputfile.json,outputfile.css)

Input format

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

Output format

The output .css file will contain

selector1 {
	property1.1: value1.1;
	propery1.2: value1.2;
}

selector2 {
	property2.1: value2.1;
}
1.0.2

6 years ago

1.0.1

7 years ago

1.0.0

7 years ago