0.1.9 • Published 8 years ago

jsontosass-loader v0.1.9

Weekly downloads
320
License
-
Repository
github
Last release
8 years ago

NO LONGER SUPPORTED. IF YOU WOULD LIKE TO TAKE OVER THIS PACKAGE SEND ME A MESSAGE.


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

Documentation: Using loaders

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

{
"breakpoints":{
    "portraitS": "320px",
    "portraitM": "360px",
    "portraitL": "414px",
  },
  "localNavHeight":"50px",
}

Output SCSS

$breakpoints:(portraitS:320px,portraitM:360px,portraitL:414px);
$localNavHeight:50px;

Forked from gist: jsonToSassVars and prepend-loader

License

MIT (http://www.opensource.org/licenses/mit-license.php)

0.1.9

8 years ago

0.1.8

8 years ago

0.1.7

8 years ago

0.1.6

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.2

9 years ago

0.1.1

9 years ago