Move tasks to separate files and simplify
This commit is contained in:
parent
dde26ec45e
commit
06ba111392
12 changed files with 1560 additions and 1030 deletions
25
gulp/modules/plumber.js
Normal file
25
gulp/modules/plumber.js
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
const plumber = require('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 %>"
|
||||
// })
|
||||
// });
|
||||
// }
|
||||
|
||||
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');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = catchErrors;
|
||||
Loading…
Add table
Add a link
Reference in a new issue