Created
March 2, 2015 14:46
-
-
Save rootical/5c869a55125a0b73c6be to your computer and use it in GitHub Desktop.
Browserify, babel, source maps, gulp, es6, babelify
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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')); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you