I can't get it to work with Grunt
bpaugam opened this issue · 3 comments
I'm trying to use node-sass-json-importer
in my project along Grunt (grunt-sass
), but can't achieve it. Here is what I'm doing:
// Gruntfile.js (options passed to the grunt-sass task)
{
options:{
outputStyle: 'compressed',
sourcemap: 'inline',
importer: [require('node-sass-json-importer')]
},
dist:{
files: [
{
"dist/main.min.css": "scss/main.scss"
}
]
}
};
// main.scss
@import "variables.json";
[...]
Problem is: no error is fired but main.min.css
remains hopelessly empty.
Actually, rolling back to version 1.0.4 fixed the other regular @imports (which was why output file was empty).
I guess this is an issue with 1.0.5.
Local versions of node modules are:
- grunt-sass#1.2.0
- node-sass#3.7.0
Hi @bpaugam! I just bumped this library to version 2.0.0. Try it an see if it works for you. It removes the library's dependency on node-sass
(only used for retrieving sass.NULL
) which caused issues when using other libraries defining their own node-sass
dependencies. Not sure if that's what you're running into, but there's a chance. Keep me posted.
See the following issue for more details:
sass/node-sass#1291
Hi pmowrer! Indeed, bumping it to 2.0.0 fixed the problem.
Thanks for the heads up, and keep up the good work!