** 我希望能够使用 Compass 但 Grunt watch 无法正常工作并给我一些奇怪的错误:**
Running "watch" task
Waiting...Verifying property watch exists in config...ERROR
>> Unable to process task.
Warning: Required config property "watch" missing.
/Applications/MAMP/htdocs/davide77.bitbucket.org/sky-route-1/node_modules/grunt-contrib-compass/node_modules/tmp/lib/tmp.js:261
throw err;
^
RangeError: Maximum call stack size exceeded
module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
compass: {
dev: {
src: 'sass',
dest: 'stylesheets',
outputstyle: 'expanded',
linecomments: true,
forcecompile: true,
require: [
'animate-sass',
'mylib'
],
debugsass: true,
images: '/assets/images',
relativeassets: true
},
prod: {
src: 'sass',
dest: 'stylesheets',
outputstyle: 'compressed',
linecomments: false,
forcecompile: true,
require: [
'animate-sass',
'mylib'
],
debugsass: false,
images: '/assets/images',
relativeassets: true
},
dist: {
src: 'sass',
dest: 'stylesheets',
outputstyle: 'compressed',
linecomments: false,
forcecompile: true,
require: [
'animate-sass',
'mylib'
],
debugsass: false,
images: '/assets/images',
relativeassets: true
},
watch: { // for development run 'grunt watch'
compass: {
files: ['sass/*.scss'],
tasks: ['compass:dev']
}
}
}
});
// Default task(s).
//grunt.registerTask('default', 'compass:dev');
grunt.registerTask('watch', ['watch']);
grunt.loadTasks('watch');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.registerTask('default', ['compass']);
};