importjson

0.0.2 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i importjson

Weekly Downloads

2

Version

0.0.2

License

MIT

Last publish

Collaborators

  • zoepage