rollup-plugin-sass
Advanced tools
Comparing version 0.0.5 to 0.0.6
15
index.js
'use strict'; | ||
var path = require('path'); | ||
var nodeSass = require('node-sass'); | ||
@@ -8,3 +9,2 @@ var rollupPluginutils = require('rollup-pluginutils'); | ||
var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; | ||
var filter = rollupPluginutils.createFilter(options.include || [ '**/*.sass', '**/*.scss' ], options.exclude || 'node_modules/**'); | ||
@@ -19,5 +19,12 @@ | ||
return new Promise(function (resolve, reject) { | ||
nodeSass.render(Object.assign({ | ||
var paths = [path.dirname(id), process.cwd()]; | ||
var sassConfig = Object.assign({ | ||
file: id | ||
}, options.config || {}), function (error, result) { | ||
}); | ||
sassConfig.includePaths = sassConfig.includePaths | ||
? sassConfig.includePaths.concat(paths) | ||
: paths; | ||
nodeSass.render(sassConfig, function (error, result) { | ||
var temp = { | ||
@@ -29,3 +36,3 @@ code: result.css.toString(), | ||
if (error) { | ||
temp.error = error; | ||
temp.error = error.codeFrame; | ||
reject(error); | ||
@@ -32,0 +39,0 @@ } |
{ | ||
"name": "rollup-plugin-sass", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "Rollup .sass files.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2088
36