json-sass-obj
v0.1.0
Published
Object mode wrapper for json-sass
Downloads
4
Readme
json-sass-obj
Object mode wrapper for jsonSass
Usage Example
var File = require("vinyl")
var jsonSassObj = require("json-sass-obj")
var fakeFile = new File({
path: "path/to/some.json",
contents: new Buffer(JSON.stringify({
"foo" : "baz",
"bee" : [1,2,3]
}))
})
var stream = jsonSassObj({
prefix: "$someItem: ",
suffix: " !default;"
})
stream.write(fakeFile)
stream.once('data', function(file){
var scss = file.contents.toString()
// scss
//
// $someItem: (
// foo: baz,
// bee: (1, 2, 3)
// ) !default
// file.path === "path/to/some.scss"
})