Created
February 1, 2016 15:12
-
-
Save sbalay/238749f72da20cfb4bcc to your computer and use it in GitHub Desktop.
Simple js gulp task for production environment
This file contains hidden or 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 uglify from 'gulp-uglify'; | |
import babel from 'gulp-babel'; | |
import concat from 'gulp-concat'; | |
const localConfig = { | |
src: './src/js/**/*.js', | |
dest: './build/js/', | |
buildFileName: 'all.js' | |
}; | |
gulp.task('js:production', () => | |
gulp.src(localConfig.src) | |
.pipe(babel()) | |
.pipe(concat(localConfig.buildFileName)) | |
.pipe(uglify()) | |
.pipe(gulp.dest(localConfig.dest)) | |
); | |
gulp.task('build:production', ['js:production', 'css:production', 'vendor:production']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment