Convert JSON config files to SCSS!
With this library, you can store your variables in JSON and convert it to SCSS just before building the files. It supports plain strings as well as lists and maps, even nested ones.
Sample JSON data:
Gnereated SCSS code:
To use the command line version, globally install
npm install -g json2scss
To convert a JSON file to SCSS, run,
json2scss input.json > output.scss
And you're done.
To use it in the code, locally install
npm install --save-dev json2scss
To convert a JSON string or plain object into SCSS,
var json2scss =json = ;console;