obj-sass

0.1.0 • Public • Published

obj-sass

convert Object to scss/sass variable String.

based on gulp-json-sass

Install

$ npm install obj-sass

Usage

var objSass = require('obj-sass');
var options = {};
var sass = objSass(options);

options

almost same options with gulp-json-sass. but obj is added and ignoreJsonErrors is deleted.

see gulp-json-sass

obj

Type: Object Default: {}
the object will be converted to scss/sass variable string.

objSass({
  obj: {
    key: 'value',
    obj: {
        key: 0
    },
    array: [1, 2, 3]
  }
});
 
// output
// $key: value;
// $obj-key: 0;
// $array-0: 1;
// $array-1: 2;
// $array-2: 3;
//

License

MIT

Package Sidebar

Install

npm i obj-sass

Weekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • kaminaly