Reputation: 623
On the page for gulp ruby sass https://www.npmjs.com/package/gulp-ruby-sass/
It says "Handle Sass errors with an on('error', cb) listener. gulp-ruby-sass throws errors like a gulp plugin, but streams the erroring files so you can see Sass errors in your browser too."
Then I should be able to log the error that it says it throws but when an error happens it is logged to the console and my error callback is never invoked, this is my code:
gulp.task("css", function() {
return sass(paths.css.in)
.on('error', logError)
.pipe(gulp.dest(paths.css.out));
});
Am I doing something wrong?
Upvotes: 0
Views: 202
Reputation: 10601
Just fixed this today actually. Use the emitCompileError
option in version 1.3.0.
Note we can't log specific errors because:
I may do some behind the scenes line-by-line parsing to fix this in the future.
For more info see the gulp-ruby-sass readme and the issue https://github.com/sindresorhus/gulp-ruby-sass/issues/209.
Upvotes: 1