0.2.0 • Published 11 years ago

json2sass v0.2.0

Weekly downloads
2
License
-
Repository
github
Last release
11 years ago

json2sass

Generate SASS/SCSS vars files out of a JSON

It turns this:

{
    "/*": "This is a special comment",
    "button": {
        "//": "This is a simple comment",
        "color": "green",
        "padding": "10px",
        "font": {
            "family": "'Helvetica Arial sans-serif'",
            "color": "white"
        }
    }
}

Into this:

/**
 * This is a special comment
 */

// This is a simple comment
$button-color: green
$button-padding: 10px
$button-font-family: 'Helvetica Arial sans-serif'
$button-font-color: white

dependencies

  • Nodejs

usage

Using as a module:

var json2sass = require('json2sass');
json2sass.toSass('path/to/existing.json', 'path/to/created.sass');
json2sass.toScss('path/to/existing.json', 'path/to/created.scss');

Or by cloning the repo:

node . --input path/to/existing.json --output path/to/created.sass
node . --input path/to/existing.json --output path/to/created.scss --type scss
0.2.0

11 years ago

0.1.5

12 years ago

0.1.4

12 years ago

0.1.3

12 years ago

0.1.2

12 years ago

0.1.1

12 years ago

0.1.0

12 years ago