我是Grunt的新手,我正在尝试配置grunt-contrib-sass与Compass一起工作.
我正在使用grunt-contrib-sass插件,因为我需要将我的.scss文件导出到两个不同的目的地,我无法使用grunt-contrib-compass.
我遇到的问题是,在编译.scss文件时,我得到'错误:无法在终端中加载罗盘'.
这是我的gruntfile.js的副本;
module.exports = function(grunt){
grunt.initConfig({
uglify: {
my_target: {
files: {
'wp-content/themes/mytheme/js/functions.js' : [ 'components/js/*.js' ]
}
}
}, // uglify
sass:{
dist:{
files: {
'wp-content/themes/mytheme/style.css' : 'components/sass/style.scss',
'wp-content/themes/mytheme/css/ie.css' : 'components/sass/ie.scss '
},
options: {
compass: true,
}
}
},
watch: {
scripts : {
files: ['components/js/*.js'],
tasks: ['uglify']
},
css: {
files: [ 'components/sass/*.scss'],
tasks: [ 'sass' ],
options: { livereload: true }
},
livereload: {
options: { livereload: true },
files: ['wp-content/themes/mytheme/'],
},
} // …Run Code Online (Sandbox Code Playgroud)