当我运行grunt sass时,我的grunt-contrib-sass会在出现编译错误时停止并回溯,但当sass通过grunt-contrib-watch触发时不会停止。
sass: {
development: {
options: {
style: 'expanded'
},
files: [
{
expand: true,
cwd: '<%= paths.development %>stylesheets/',
src: ['*.scss', '*.sass'],
dest: '<%= paths.development %>assets/',
ext: '.css.liquid'
},
]
},
watch: {
sass: {
files: [
'<%= paths.development %>stylesheets/*{.sass,.*scss}'
],
tasks: ['sass:development'] // this swallows errors
},我似乎找不到任何关于如何防止这种情况发生的信息,在grunt-contrib-sass或grunt contrib-watch文档中。没有错误传播选项。我遗漏了什么?
我在5+上没有遇到过这个问题,其他以前有类似watch->sass设置的grunt项目,我很好奇互联网是怎么想的。
发布于 2014-10-31 18:13:06
在没有任何错误信息的情况下,确定如何解决您的问题并不难。grunt sass -v跟你说了什么?
此外,我在过去也遇到过类似的问题,尽管我不记得实际的错误消息。我用grunt-sass而不是grunt-contrib-sass解决了这个问题。
https://stackoverflow.com/questions/26661874
复制相似问题