Skip to content

Instantly share code, notes, and snippets.

@rootical
Created March 2, 2015 14:46
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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