0.0.1 • Published 8 years ago

json-to-scss-or-sass v0.0.1

Weekly downloads
31
License
MIT
Repository
github
Last release
8 years ago

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

ReleaseNotes
0.0.0Alpha release

Licence

MIT

0.0.1

8 years ago

0.0.0

8 years ago