我安装了npm和grunt,然后安装了grunt contrib指南针。但是当我跑步的时候咕哝。我有这个错误
Running “compass:dist” (compass) task
Warning: not found: compass Use –force to continue.
Aborted due to warnings
这是我的gruntfile.js
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
compass: {
dist: {
options: {
sassDir: 'sass',
cssDir: 'css'
}
}
},
watch: {
css: {
files: '**/*.scss',
tasks: ['compass']
}
}
});
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default',['watch']);
}
您需要安装Compass Ruby gem,如下所述。基本上,你需要安装Ruby,然后使用它可以安装Compass gem和grunt contrib Compass应该可以工作