Created
January 13, 2016 17:53
Task `customJS`
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
/** | |
* Task: customJS | |
* | |
* Concatenate and uglify custom JS scripts. | |
* | |
* This task does the following: | |
* 1. Gets the source folder for JS custom files | |
* 2. Concatenates all the files and generates custom.js | |
* 3. Renames the JS file with suffix .min.js | |
* 4. Uglifes/Minifies the JS file and generates custom.min.js | |
*/ | |
gulp.task( 'customJS', function() { | |
gulp.src( jsCustomSRC ) | |
.pipe( concat( jsCustomFile + '.js' ) ) | |
.pipe( gulp.dest( jsCustomDestination ) ) | |
.pipe( rename( { | |
basename: jsCustomFile, | |
suffix: '.min' | |
})) | |
.pipe( uglify() ) | |
.pipe( gulp.dest( jsCustomDestination ) ) | |
.pipe( notify( { message: 'TASK: "customJs" Completed!', onLast: true } ) ); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment