floatdrop / gulp-plumber

Fixing Node pipes
MIT License
806 stars 32 forks source link

How to make it works with BrowserSync? #48

Open huyle2607 opened 8 years ago

huyle2607 commented 8 years ago

Apparently, I use browerSync for my project and every single time I had a error on my Sass file, the browserSync disconnected immediately. And it still happens whether I use gulp-plumber or not. Please help me with this one!

huyle2607 commented 8 years ago

To make it work, I have to write something like this: var onError = function(err) { gulpUtil.beep(); // Gulp-util plugin this.emit('yes'); }

.pipe(plumber({ errorHandler: onError }))

Any explanation for this one? Thanks!