-
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
Stopping dependent task, but not gulp #27
Comments
@callumacrae you can try to reemit gulp.task('js-quality', function (cb) {
gulp.src('./src/js/**/*.js')
.pipe(plugins.plumber(function (err) { onError(err); cb(err); } ))
.pipe(plugins.jscs())
.pipe(plugins.jshint())
.pipe(plugins.jshint.reporter(stylish))
.on('end', cb);
}); |
I wonder how to make this work too. |
+1 for the right way to do this, preferably compatible with Gulp4. |
In Gulp 3 you can call 'this.destroy()' in plumber error handler to prevent 'end' event from firing. .pipe( plugins.plumber( { errorHandler: function ( error ) {
onError( error );
this.destroy();
} } ) ) |
I have the two following tasks:
When js-quality fails, I want
onError
to be called (which pipes the error through to browser-sync and beeps), but I don't want thejs
task to run.Is there any way to do this, or is this something I'll have to work around until Gulp 4?
The text was updated successfully, but these errors were encountered: