stackviz/gulp/util/handleErrors.js
Tim Buckley 0034283601 Add initial Angular boilerplate files.
Adds boilerplate files from `angularjs-gulp-browserify-boilerplate`
to start work on Angular rewrite of the frontend.

Change-Id: I54392c24f397496582f9d06d561d5c14a92ccbe6
2015-09-25 16:26:44 -06:00

27 lines
559 B
JavaScript

'use strict';
var notify = require('gulp-notify');
module.exports = function(error) {
if( !global.isProd ) {
var args = Array.prototype.slice.call(arguments);
// Send error to notification center with gulp-notify
notify.onError({
title: 'Compile Error',
message: '<%= error.message %>'
}).apply(this, args);
// Keep gulp from hanging on this task
this.emit('end');
} else {
// Log the error and stop the process
// to prevent broken code from building
console.log(error);
process.exit(1);
}
};