json to sass loader for webpack
0.1.8 Changes
- Flagged as cacheable
- Simpler implementation (See Example Config)
- Marked dependencies (triggers build on webpack watch and webpack-dev-server when vars file is changed)
Installation
npm install jsontosass-loader --save-dev
Usage
Example config
var sassVars = 'path/to/your/vars.json';var webpackConfig =module:loaders:test: /.scss$/ loader: "style!css!sass!jsontosass?path="+ sassVars
Input [YourVars.json file]
Output SCSS
;;
Forked from gist: jsonToSassVars and prepend-loader
License
MIT (http://www.opensource.org/licenses/mit-license.php)