目前 Grunt Watch 在编译错误更正后无法重新运行任务,我遇到了这个问题。
我收到了错误信息,但是在更正错误后,grunt 说文件已更改,但此时没有运行任何任务。
Grunt 文件:
watch: {
less: {
files: ['public/assets/less/**/*.less'],
tasks: ['css'],
options: {
atBegin: true,
nospawn: true
}
},
scripts: {
files: [
'public/assets/js/homepage.js'
],
tasks: ['jsApp'],
options: {
nospawn: true,
}
}
},
错误日志:
>> ParseError: Unrecognised input in public/assets/less/template.less on line 114, column 31:
>> 114 @media screen and (max-width: 767px) {
>> 115 left: 0;
Warning: Error compiling public/assets/less/main.less
// ----- Corrected the file here, saved again -----
>> File "public/assets/less/template.less" changed.
文件结束。此点后无任何内容。