문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top