require to import
exports are not working
This commit is contained in:
parent
f7a5481fd2
commit
da075e5beb
7 changed files with 69 additions and 72 deletions
24
gulp/modules/plumber.mjs
Normal file
24
gulp/modules/plumber.mjs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import plumber from 'gulp-plumber';
|
||||
// const notify = require('gulp-notify');
|
||||
|
||||
// function catchErrors(errTitle) {
|
||||
// return plumber({
|
||||
// errorHandler: notify.onError({
|
||||
// // Customizing error title
|
||||
// title: errTitle || "GULP GENERAL PROBLEM",
|
||||
// message: "<%= error.message %>"
|
||||
// })
|
||||
// });
|
||||
// }
|
||||
|
||||
export function catchErrors() {
|
||||
return plumber({
|
||||
errorHandler: function (err) {
|
||||
// Logs error in console
|
||||
console.log(err.message);
|
||||
// Ends the current pipe, so Gulp watch doesn't break
|
||||
this.emit('end');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue