Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can't get it to work with Grunt #28

Closed
bpaugam opened this issue May 14, 2016 · 3 comments
Closed

I can't get it to work with Grunt #28

bpaugam opened this issue May 14, 2016 · 3 comments

Comments

@bpaugam
Copy link

bpaugam commented May 14, 2016

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.

@bpaugam
Copy link
Author

bpaugam commented May 14, 2016

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

@pmowrer
Copy link
Owner

pmowrer commented May 17, 2016

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

@bpaugam
Copy link
Author

bpaugam commented May 18, 2016

Hi pmowrer! Indeed, bumping it to 2.0.0 fixed the problem.

Thanks for the heads up, and keep up the good work!

@bpaugam bpaugam closed this as completed May 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants