Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting up grunt-contrib-sass with node-bourbon

I am trying to add bourbon as a dependency to a project where grunt-contrib-sass is used. node-bourbon has the following to say about grunt and Sass integration:

grunt.initConfig({
  sass: {
    dist: {
      options: {
        // THIS IS THE LINE I ADDED TO MY CONFIG
        includePaths: require('bourbon').includePaths,
        outputStyle: 'compressed'
      },
      files: {
        'path/to/output.css': 'path/to/input.scss'
      }
    }
  }
});

However, when running grunt I get the following error:

OptionParser::InvalidOption: invalid option: --include-paths

This error appears with any array of paths given to includePaths, not just bourbon.

What am I doing wrong?

like image 899
Elise Avatar asked Dec 20 '22 20:12

Elise


1 Answers

node-bourbon is using grunt-sass rather than grunt-contrib-sass. That's why the option isn't available and you get this error.

So either swap those two grunt tasks or replace includePaths with loadPath. That's the equivalent option in grunt-contrib-sass.

like image 110
Max Avatar answered Dec 31 '22 23:12

Max