events.js:160 扔掉//未处理的'错误'事件 ^ SyntaxError:意外字符' ' https://msdn.microsoft.com/en-us/library/system.datetime(v=vs.110).aspx
var gulp = require('gulp');
var browserify = require('browserify');
var babelify = require('babelify');
var shim = require('browserify-shim');
var source = require('vinyl-source-stream');
var uglify = require('gulp-uglify')
gulp.task('script:build', function() {
browserify('app/main.js')
.transform(babelify, {
presets: ['es2015', 'react']
})
.transform(shim)
.bundle()
.pipe(source('bundle.js').om('error',function (e) {
console.log(e);
}))
.pipe(gulp.dest('./'));
});
gulp.task('default', ['script:build']);