Skip to content

Instantly share code, notes, and snippets.

@rajikaimal
Created December 7, 2015 04:57
Show Gist options
  • Save rajikaimal/9c2b52d09dd73989fd9c to your computer and use it in GitHub Desktop.
Save rajikaimal/9c2b52d09dd73989fd9c to your computer and use it in GitHub Desktop.
Gulp with ES6
import gulp from 'gulp';
import rename from 'gulp-rename';
import ngAnnotate from 'gulp-ng-annotate';
import watch from 'gulp-watch';
import nodemon from 'gulp-nodemon';
gulp.task('minify',() => {
gulp.src('modules/**/*.js')
.pipe(rename({
extname: '.min.js'
}))
.pipe(ngAnnotate())
.pipe(gulp.dest('min'));
});
gulp.task('nodemon',() => {
nodemon({
script: 'app.js'
});
});
gulp.task('watch',() => {
gulp.watch('modules/**/*.js', ['minify']);
});
gulp.task('default', ['nodemon','watch']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment