json-to-scss-or-sass

0.0.1 • Public • Published

Simple node module to convert json to sass or scss variables

Install

$ npm i -S json-to-scss-or-sass

Usage

'use strict';
const file_stream = require('fs');
const jsonToSass = require('json-to-scss-or-sass').sass;
const jsonToScss = require('json-to-scss-or-sass').scss;
 
file_stream.readFile('variables.json', 'utf8', function(error, data) {
  var scss = jsonToScss(data);
  
   if(scss !== undefined) {
   file_stream.writeFile("src/sass/base/_variables.scss", scss, 'utf8');
   }
});

Options

jsonToSass(jsonString, options)

options.scssIndent

Type: String Default value: ' '

options.notQuotes

Type: Array Default value: []

Array of strings and / or regular expressions that determine what values will be without double quotes

Release Notes

Release Notes
0.0.0 Alpha release

Licence

MIT

Readme

Keywords

Package Sidebar

Install

npm i json-to-scss-or-sass

Weekly Downloads

10

Version

0.0.1

License

MIT

Last publish

Collaborators

  • orel-s-binoklem