code: function bundleRelease(minify) {
    var bundler = browserify({
      entries: ['./src/' + entryFileName],
      standalone: standaloneName,
      debug: !minify
    });
  
    if(minify) {
      bundler = bundler.plugin(collapse);
    }
  
    var stream = bundler.bundle()
      .on('error', logError);
  
    if(!minify) {
      stream = stream.pipe(exorcist('./dist/' + bundleFileName + '.map'));
    }
  
    stream = stream.pipe(source(bundleFileName))
      .pipe(buffer())
      .pipe(derequire())
      .pipe(strip());
  
    if(minify) {
      return stream.pipe(rename({extname: '.min.js'}))
        .pipe(uglify())
        .pipe(gulp.dest('./dist/'));
    } else {
      return stream.pipe(gulp.dest('./dist/'));
    }
  }
docs: release bundle with extra compression (can't get collapse to work with watchify)