var gulp = require('gulp'),
    browserify = require('browserify'),
    babelify = require('babelify'),
    source = require('vinyl-source-stream'),
    paths = require('../paths');

gulp.task('scripts:app', function () {
  return browserify({
    entries: paths.app.scriptsMain,
    debug: true,
    transform: ['browserify-handlebars']
  })
  .transform('babelify', { presets: ['es2015'] })
  .bundle()
  .pipe(source('app.js'))
  .pipe(gulp.dest(paths.app.tmpJSDir));
});

gulp.task('scripts:vendor', function () {
  return browserify({
    entries: paths.app.scriptsVendor
  })
  .transform('babelify', { presets: ['es2015'] })
  .bundle()
  .pipe(source('vendor.js'))
  .pipe(gulp.dest(paths.app.tmpJSDir));
});

@@ -390,32 +390,124 @@
  %7D)%0A  .bundle()%0A
+  .on('error', function (err) %7B%0A    console.log(err.toString());%0A    this.emit('end');%0A  %7D)%0A
   .pipe(source('
@@ -729,16 +729,108 @@
 undle()%0A
+  .on('error', function (err) %7B%0A    console.log(err.toString());%0A    this.emit('end');%0A  %7D)%0A
   .pipe(

Add error handling so JS errors don't break streams