Skip to content

Instantly share code, notes, and snippets.

@mcattx
Created October 26, 2016 06:47
Show Gist options
  • Save mcattx/e06275a90220c71457b724b48bd017ab to your computer and use it in GitHub Desktop.
Save mcattx/e06275a90220c71457b724b48bd017ab to your computer and use it in GitHub Desktop.
simple gulp config for es2015 developing
{
"presets": ["es2015"]
}
var gulp = require('gulp');
var babel = require('gulp-babel');
var plumber = require('gulp-plumber');
gulp.task('complie', function () {
return gulp.src('src/**/*.js')
.pipe(plumber())
.pipe(babel())
.pipe(gulp.dest('dist'));
});
gulp.task('watch', function() {
gulp.watch('src/**/*.js', ['complie']);
})
gulp.task('default', ['complie', 'watch']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment