0.0.2 • Published 8 years ago

importjson v0.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

Import JSON to SCSS

Adding variables dynamically to your SCSS is possible now. Just add the following:

JSON

{
	"main-color": "#c33",
	"second-color": "#33c",
	"third-color": "#192"
}

SCSS

{
$main-color:#c33;
$second-color:#33c;
$third-color:#192;
}

Usage

Add a script to your package.json

"scripts": {
	"build": "node ./lib/importJson.js 'path-to-json' 'path-to-scss'"
} 

Run the build:

npm run build