Skip to content

Commit 36b0021

Browse files
author
erindepew
committed
enabling gulp-uglify handle es6 syntax
1 parent a1ea3a9 commit 36b0021

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

gulpfile.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ var reactify = require('reactify');
66
var gulpif = require('gulp-if');
77
var uglify = require('gulp-uglify');
88
var streamify = require('gulp-streamify');
9+
var babel = require('gulp-babel');
910
var notify = require('gulp-notify');
1011
var concat = require('gulp-concat');
1112
var cssmin = require('gulp-cssmin');
@@ -45,6 +46,7 @@ var browserifyTask = function (options) {
4546
appBundler.bundle()
4647
.on('error', gutil.log)
4748
.pipe(source('main.js'))
49+
.pipe(streamify(babel({presets: ['es2015']})))
4850
.pipe(gulpif(!options.development, streamify(uglify())))
4951
.pipe(gulp.dest(options.dest))
5052
.pipe(gulpif(options.development, livereload()))

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
"watchify": "^2.1.1"
2626
},
2727
"dependencies": {
28+
"babel-preset-es2015": "^6.9.0",
29+
"gulp-babel": "^6.1.2",
2830
"react": "^0.13.3"
2931
}
3032
}

0 commit comments

Comments
 (0)