Exception safe javascript wrapper
Wraps files in a try/catch statement to not expose errors.
$ npm install --save-dev gulp-safety-net
var gulp = require('gulp'),
safetyNet = require('gulp-safety-net');
gulp.task('default', function () {
return gulp.src('src/app.js')
.pipe(safetyNet())
.pipe(gulp.dest('dist'));
});
Type: Function
Default: function () {}
Allows a custom setup outside of the try/catch block.
setup : function() { window.Logger = new Logger(); }
Type: String
Default: 'console.log(e)'
Provides an alternative logging call to pass the error to.
logger: 'myCustomLogger(e)'
MIT