Created
September 10, 2016 14:22
-
-
Save aseredenko/621bbd190ba3576a441521296528c838 to your computer and use it in GitHub Desktop.
Gulp function for compresing js files
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
var gulp = require('gulp'); | |
var uglify = require('gulp-uglify'); | |
var rename = require("gulp-rename"); | |
gulp.task('compressjs', function () { | |
gulp.src('js/*.js') | |
.pipe(uglify()) | |
.pipe(rename({ suffix: '.min' })) | |
.pipe(gulp.dest('dist')) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment