Skip to content

SpenceDiNicolantonio/node-sass-json-importer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-sass-json-importer build status

JSON importer for node-sass. Allows @importing .json files in Sass files parsed by node-sass.

Usage

This module hooks into node-sass's importer api.

var sass = require('node-sass');
var jsonImporter = require('node-sass-json-importer');

// Example 1
sass.render({
  file: scss_filename,
  importer: jsonImporter,
  [, options..]
}, function(err, result) { /*...*/ });

// Example 2
var result = sass.renderSync({
  data: scss_content
  importer: [jsonImporter, someOtherImporter]
  [, options..]
});

Thanks to

This module is based on the sass-json-vars gem, which unfortunately isn't compatible with node-sass.

About

Allows importing json in sass files parsed by node-sass.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%