Created
January 13, 2016 17:52
-
-
Save ahmadawais/0e7ff94af94495a0cd16 to your computer and use it in GitHub Desktop.
Task `vendorJS`
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: vendorJS | |
* | |
* Concatenate and uglify vendor JS scripts. | |
* | |
* This task does the following: | |
* 1. Gets the source folder for JS vendor files | |
* 2. Concatenates all the files and generates vendors.js | |
* 3. Renames the JS file with suffix .min.js | |
* 4. Uglifes/Minifies the JS file and generates vendors.min.js | |
*/ | |
gulp.task( 'vendorsJs', function() { | |
gulp.src( jsVendorSRC ) | |
.pipe( concat( jsVendorFile + '.js' ) ) | |
.pipe( gulp.dest( jsVendorDestination ) ) | |
.pipe( rename( { | |
basename: jsVendorFile, | |
suffix: '.min' | |
})) | |
.pipe( uglify() ) | |
.pipe( gulp.dest( jsVendorDestination ) ) | |
.pipe( notify( { message: 'TASK: "vendorsJs" Completed!', onLast: true } ) ); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment