Created
December 7, 2015 04:57
-
-
Save rajikaimal/9c2b52d09dd73989fd9c to your computer and use it in GitHub Desktop.
Gulp with ES6
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
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