-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compatibility with lazypipe #16
Comments
Last code snippet is working fine for me, but with small addition: var gulp = require('gulp');
var lazypipe = require('lazypipe');
var gless = require('gulp-less');
var plumber = require('gulp-plumber');
var less = lazypipe()
.pipe(plumber)
.pipe(gless)
.pipe(gulp.dest, 'tmp');
gulp.task('default', function() {
return gulp.src('css/*.less')
.pipe(less()
.on('error', function (err) {
console.log(err);
}));
}); Lazystream uses [gulp] Using gulpfile /Users/floatdrop/gulp-lazypipe/gulpfile.js
[gulp] Starting 'default'...
{ plugin: 'gulp-less',
showStack: false,
name: 'Error',
message: 'Unrecognised input in file /Users/floatdrop/gulp-lazypipe/css/1.less line no. 12',
fileName: '/Users/floatdrop/gulp-lazypipe/css/1.less',
lineNumber: 12 } Gulp-plumber will not add it own error handler, if there is one already defined. |
Even though the reference has come through to this issue, I've also run into this issue with the following floatdrop/gulp-watch#52. |
Encountering this as well. Adding |
If anyone is still having problem with this, I found a work-around reading this article: http://lkrnac.net/blog/2014/10/watch-file-changes-propagate-errors-gulp. It provides this explanation:
So, to make plumber not crash, include it in all of your pipes. It's not pretty, as there's all of a sudden a lot plumbers everywhere, but it works. @floatdrop: Are there any dangers of not calling |
@gligoran nope, it just restores original |
It works well!
But with lazy pipe:
I also tried putting plumber inside the lazy pipe:
The text was updated successfully, but these errors were encountered: