Skip to content

Instantly share code, notes, and snippets.

@AZaviruha
Created January 20, 2016 13:21
Show Gist options
  • Save AZaviruha/16c0fb54bb5db32a1370 to your computer and use it in GitHub Desktop.
Save AZaviruha/16c0fb54bb5db32a1370 to your computer and use it in GitHub Desktop.
var browserify = require('browserify');
var source = require('vinyl-source-stream');
var babelify = require('babelify');
var buffer = require('vinyl-buffer');
gulp.task('js', function () {
return browserify(join(__dirname, PATH.src.install.jsMain), { debug: true })
.on('error', function(err) { console.error(err); this.emit('end'); })
.transform(babelify, {presets: ["es2015", "stage-0"]})
.bundle()
.pipe(source('app.js'))
.pipe(buffer())
.pipe(gulp.dest(join(PATH.dest.install.js)));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment