-
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
Not working with gulp-less #30
Comments
Can you reduce code to only |
okay, i got it. |
I have a similar issue. The test case is as follows: gulp.task('css-failing', () =>
gulp.src('./css/floating_layout.less', {base: './css'})
.pipe(plumber())
.pipe(less())
.pipe(gulp.dest('./css'))
); Now when I remove a semi-colon inside
When I restore the semicolon but remove one in another less file that is imported from the previous one, it also displays an error and finishes with code 0 but the task doesn't seem to finish at all:
I believe that's the reason why, when combined with gulpm-plumber 1.1.0, gulp-less 3.0.5, gulp-watch 4.3.5. |
This is what worked for me:
The plumber config doesn't have to be reusable, but I think what trips |
@webxl makes a good point, but that very often fails with Instead, simply emit the gulp.src('…')
.pipe(plumber(function (error) {
console.log(error);
this.emit('end');
}))
.pipe(less)
.dest(gulp.dest('…')); |
Thanks @ianbytchek , your solution works with my jade task |
@josecabana after trial and error I ended up using the following, plumber(function (error) {
// Must emit end event for any dependent streams to pick up on this. Destroying the stream
// ensures nothing else in that stream gets done, for example, if we're dealing with five
// files, after an error in one of them, any other won't carry on. Doing destroy without
// ending it first will not notify depending streams, tasks like `watch` will hang up.
this.emit('end');
this.destroy();
} |
I used plumber to prevent exiting on any error thrown while compiling my less files.I purposely made an error in my less file and of course an error occurred while compiling it.I expected that plumber can prevent it but it actually didn't work at all. Or Is there anything wrong in my gulpfile ?
Here's following the critical code of my gulpfile.js and i run "gulp watch" to watch my less files and auto-compiling on modifications.
The text was updated successfully, but these errors were encountered: