[英]How do I propagate errors to grunt-contrib-watch from grunt-contrib-sass?
My grunt-contrib-sass
will stop on compilation error with a traceback when I run grunt sass
, but not when sass
is triggered via grunt-contrib-watch
. 我grunt-contrib-sass
将停止编译错误与回溯,当我运行grunt 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
},
I can't seem to find any information on how to prevent this from happening in the grunt-contrib-sass or grunt-contrib-watch documentation. 在grunt-contrib-sass或grunt-contrib-watch文档中,我似乎找不到任何有关如何防止这种情况发生的信息。 There is no error propagation option. 没有错误传播选项。 What am I missing? 我想念什么?
I have not had this problem on 5+ other previous grunt based projects with similar watch->sass
setups and am curious what the internet thinks. 我在其他5个以前基于grunt的项目中都没有这个问题,这些项目具有类似的watch->sass
设置,并且很好奇互联网的想法。
Without any error message it cant be hard to determine how to solve your problem. 没有任何错误消息,很难确定如何解决您的问题。 What does grunt sass -v
tell you? grunt sass -v
告诉你什么?
Also I've had a similar problem in the past, tho I don't recall the actual error message. 过去我也遇到过类似的问题,所以我不记得实际的错误消息。 I solved the problem by using grunt-sass instead of grunt-contrib-sass
. 我通过使用grunt-sass而不是grunt-contrib-sass
解决了这个问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.