不确定这是否是我的错误或错误配置,但是当使用 grunt 监视一些 sass 文件时,它肯定会监视文件,但仅在我退出监视程序时编译 sass 并更新到目标文件。
这是我的监视节点:
watch: {
sass : {
files: [sassPath.scss],
tasks: ['sass']
}
}
例如,这是当前正在发生的事情:
1. I do `grunt watch` on the command line
2. Start editing sass files
3. Command line notifies me that the change has been detected and it runs the sass task successfully
4. I manually look at the destination css file - no changes
5. ctrl + c to close the watcher while looking in the destination css file - i can see it updated as soon as the watch closes
我真的希望在编译 sass 后立即更新目标 css 文件