2
我是新来的呼噜声,我试图配置gruntfile要监视更改并运行正确的编译器(指南针,JST,并jshint对于现在)咕噜观看不运行次要任务
指南针,JST,和JsHint一切工作都很好,但是当我尝试从手表中调用它们时,它们没有激活。 gruntfile检测到更改但什么都不做。
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
compass: {
dev: {
files: {
"stylesheets/global.css": "sass/*.scss"
}
}
},
jst: {
compile: {
files: {
"javascript/compiled/templates.js": ["templates/*.html"]
}
}
},
jshint: {
files: ['gruntfile.js', 'javascript/**/*.js'],
options: {
// options here to override JSHint defaults
globals: {
jQuery: true,
console: true,
module: true,
document: true
}
}
},
watch: {
css: {
files: 'sass/*.scss',
task: ['compass']
},
templates: {
files: 'templates/*.html',
task: ['jst']
},
scripts: {
files: ['javascript/**/*.js', 'gruntfile.js'],
task: ['jshint']
},
options: {
spawn: true
}
}
});
grunt.loadNpmTasks('grunt-contrib-jst');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default', ['jst', 'compass', 'watch']);
};
我在做什么错?我已经在所有宝石及其依赖项上运行了gem install。
*叹*,因为这个错字我刚刚失去了两个小时 – Joe