Last active
April 23, 2017 04:28
-
-
Save LoyEgor/322b583ce76abf92ec1701426eca48ee to your computer and use it in GitHub Desktop.
compress js
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
// install | |
// npm i gulp-concat gulp-uglify | |
var concat = require('gulp-concat'); | |
var uglify = require('gulp-uglify'); | |
// concat and clean js | |
gulp.task('compress:js', function () { | |
var jsjq = './app/js/jquery.min.js'; | |
var jscore = './app/js/core.js'; | |
var jsplug = './app/js/plugins.js'; | |
var jsscript = './app/js/scripts.js'; | |
return gulp.src([jsjq, jscore, jsplug, jsscript]) | |
.pipe(concat('scripts.js')) | |
.pipe(uglify()) | |
.pipe(gulp.dest('./dist/js')); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment