Grunt找不到任务
Grunt can not find task
我的grunt配置出了问题,我不知道是什么。赠送我的grunfile.js 的一部分
grunt.initConfig({
traceur: {
options: {
blockBinding: true
},
custom: {
files: [{
expand: true,
cwd: 'public/js',
src: ['*.js'],
dest: 'public/components'
}]
}
},
watch: {
js: {
files: ['public/js/*.js'],
tasks: [' traceur' ]
}
}
/* ... */
});
我从上面注册了两个任务:
grunt.registerTask('default', ['watch']);
grunt.registerTask('tr', ['traceur']);
运行grunt tr
时,一切正常。但当watch
任务在代码更改后尝试运行traceur
时,我会得到错误:
>> File "public/js/app.js" changed.
Fatal error: Task " traceur" not found
为什么咕噜不去找你的任务?
在watch
部分中,任务前面有一个前导空格。
watch: {
js: {
files: ['public/js/*.js'],
tasks: [' traceur' ]
}
}
更改为:
watch: {
js: {
files: ['public/js/*.js'],
tasks: ['traceur']
}
}
相关文章:
- 气质的“nestRemoting()”有时可以'找不到关系
- 错误405:向Java控制器(Ajax)发送JSON时找不到POST方法
- 找不到模块捆绑包
- for循环中的javascript if语句找不到==
- 为什么JavaScript可以'找不到给定的InnerHTML并返回Cannot set property
- 失败:等待Protractor与页面同步时出错:“”;在窗口上找不到角度”;
- Babel编译错误:找不到模块核心js/library/fn/get迭代器
- Grunt:jit Grunt:插件;量角器”;找不到任务
- Gruntfile.js-找不到任务“default”
- 找不到任务和子任务
- load-grunt-config 找不到目标任务
- 找不到从 CLI 运行 PHP 的 grunt-shell 任务
- Grunt:并发:服务器原因“;警告:任务;咖啡:服务器”;找不到&”;
- Grunt找不到任务
- 找不到Grunt任务
- 编写的第一个Grunt插件-即使Grunt.registerMultiTask()名称正确,也找不到任务
- "警告:任务;babel”;找不到.使用--force继续&”;
- 咕噜找不到任务
- 新的咕哝警告:任务;concat,uglify“;找不到
- Grunt警告:任务;concat”;找不到