我正在尝试将波本威士忌作为依赖项添加到使用的项目中grunt-contrib-sass
.node-bourbon有关于grunt和Sass集成的以下内容:
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' } } } });
但是,当运行grunt时,我收到以下错误:
OptionParser::InvalidOption: invalid option: --include-paths
给出的任何路径数组都会出现此错误includePaths
,而不仅仅是波本威士忌.
我究竟做错了什么?
node-bourbon
是用grunt-sass
而不是grunt-contrib-sass
.这就是为什么该选项不可用,你得到这个错误.
因此,要么交换那两个grunt任务,要么替换includePaths
为loadPath
.这是相同的选择grunt-contrib-sass
.