json-sass-obj

0.1.0 • Public • Published

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"
 
})
 

/json-sass-obj/

    Package Sidebar

    Install

    npm i json-sass-obj

    Weekly Downloads

    2

    Version

    0.1.0

    License

    ISC

    Last publish

    Collaborators

    • suisho
    • inuscript
    • terrierscript