I
I
Igor Myasnikov2017-04-24 19:28:06
gulp.js
Igor Myasnikov, 2017-04-24 19:28:06

How to make gulp continue compiling after finding an error?

Watcher in gulp stops compiling and watching files after finding an error in the code. Is it possible somehow to force it to continue watching and compiling files when they change after an error is found without restarting the Watch'er itself?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Edward, 2017-04-24
@pilium

https://www.npmjs.com/package/gulp-plumber
https://www.npmjs.com/package/gulp-notify

const plumber = require('gulp-plumber');
const notify = require('gulp-notify');

.pipe(plumber({
    errorHandler: notify.onError(err => ({
        title: 'ERROR SASS Сompilation',
        message: err.message
    }))
}))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question