Skip to content

Instantly share code, notes, and snippets.

@rootical
Created March 2, 2015 14:46
Show Gist options
  • Save rootical/5c869a55125a0b73c6be to your computer and use it in GitHub Desktop.
Save rootical/5c869a55125a0b73c6be to your computer and use it in GitHub Desktop.
Browserify, babel, source maps, gulp, es6, babelify
'use strict';
var gulp = require('gulp');
var browserify = require('browserify');
var babelify = require('babelify');
var source = require('vinyl-source-stream');
gulp.task('browserify', function() {
return browserify({ debug: true })
.transform(babelify)
.require('./src/app/index.js', { entry: true })
.bundle()
.on('error', function handleError(err) {
console.error(err.toString());
this.emit('end');
})
.pipe(source('index.js'))
.pipe(gulp.dest('.tmp/app'));
});
@antongorodezkiy
Copy link

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment