Skip to content

OrelSBinoklem/json-to-scss-or-sass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published