handleErrors.js 291 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 var notify = require("gulp-notify"); module.exports = function(){ var args = Array.prototype.slice.call(arguments); notify.onError({ title: 'compile error', message: '<%=error.message %>' }).apply(this, args);//替换为当前对象 this.emit();//提交 }