gulp-bro icon indicating copy to clipboard operation
gulp-bro copied to clipboard

How do I make errors fatal, causing gulp to fail

Open mar627 opened this issue 3 years ago • 1 comments

What currently happens: When a require('module') fails, gulp-bro reports the error, but carries on.

What I want to happen When a require('module') fails, gulp-bro causes a fatal stop to the build.

const {src, dest} = require('gulp');
const bro = require('gulp-bro')

function js() {
    return src(paths.src.js)
        .pipe(bro())
        .on('Error', function () {

        })
        .pipe(dest(paths.dest.js))
};

mar627 avatar Sep 13 '20 14:09 mar627

Hey, I think the error: 'emit' option should do what you are asking for. Let me know if it does resolve your issue.

ngryman avatar Oct 14 '20 16:10 ngryman