Skip to content

Instantly share code, notes, and snippets.

@aloerina01
Created September 13, 2016 14:40
Show Gist options
  • Save aloerina01/8c5897f723375b0f880ce676d3e541e9 to your computer and use it in GitHub Desktop.
Save aloerina01/8c5897f723375b0f880ce676d3e541e9 to your computer and use it in GitHub Desktop.
gulp + browserify + vinyl-transform
var gulp = require('gulp');
var browserify = require('browserify');
var babelify = require('babelify');
var transform = require('vinyl-transform');
gulp.task('browserify', function() {
gulp.src('./app.js')
.pipe(transform(function(filename){
return browserify(filename, {debug: true})
.transform(babelify)
.bundle();
}))
.pipe(gulp.dest('./dist/'));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment