我正在运行两个简单的任务,每个任务运行时间 spawn to false
但这似乎破坏了它,并且没有运行任何相关的任务。
以下是更改 sass 文件时的示例输出。
>> File "app/styles/main.scss" changed.
File "app/styles/main.css" created.
Done, without errors.
Elapsed time
loading tasks 4ms ▇▇▇▇▇ 9%
sass 1ms ▇▇ 2%
sass:dist 39ms ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 89%
Total 44ms
Completed in 3.862s at Mon Nov 18 2013 17:05:57 GMT+0000 (GMT) - Waiting...
OK
>> File "app/styles/main.css" changed.
Running "copy:styles" (copy) task
Copied 1 files
Done, without errors.
Elapsed time
loading tasks 4ms ▇▇▇▇▇▇▇▇▇▇▇▇ 24%
copy:styles 13ms ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 76%
Total 17ms
Completed in 3.704s at Mon Nov 18 2013 17:06:01 GMT+0000 (GMT) - Waiting...
OK
>> File ".tmp/styles/main.css" changed.
... Reload .tmp/styles/main.css ...
... Reload .tmp/styles/main.css ...
Completed in 0.000s at Mon Nov 18 2013 17:06:01 GMT+0000 (GMT) - Waiting...
在 node.js 0.10.20 上使用 grunt 0.4.1(和 grunt-cli 0.1.11)。在 2012 Macbook Air (OS X 10.8.5) 上运行
文件更改后,监视执行任务,但完成后,监视重新加载模块(!)并再次监视。
详细查看问题:
grunt tasknamewatch --verbose
我尝试过对监视任务进行递归,但没有成功。
watch: {
...,
tasks: ['sometask', 'watch']
}
一个简单有效的解决方案是使用“grunt-este-watch”。您可以在此处阅读所需的步骤:https://stackoverflow.com/a/33920834/2741005 https://stackoverflow.com/a/33920834/2741005
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)