ajwhite/gulp-ng-config — pull request #6 by rawberg (2014-12-12 23:20:50+00:00)
Title: Emit Errors for invalid JSON instead of Throwing

two small changes to emit errors instead of throwing them. this allows for graceful error recovery when using gulp watch.

gulp.src('config.json')
.pipe(gulpNgConfig('app.config'))
.on('error', function(err) {
console.log(err.toString());
this.emit('end');
})
.pipe(gulp.dest('app/scripts'));

this approach is inline with [#6 of the gulp plugin guidelines](https://github.com/gulpjs/gulp/blob/master/docs/writing-a-plugin/guidelines.md).