【发布时间】:2014-04-04 15:50:15
【问题描述】:
不确定这是否是我的错误或错误配置,但是当使用 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
我真的希望目标 css 文件在 sass 编译后立即更新
【问题讨论】:
-
我认为您的
grunt watch:sass任务没有任何问题。您是否尝试过自己运行它?这不是watch任务的常见行为,但我必须仔细查看您的Gruntfile.js以查看是否有其他问题导致问题。尝试更新您的本地grunt和相关依赖项(watch和sass)。
标签: sass gruntjs grunt-contrib-watch