Skip to content

Instantly share code, notes, and snippets.

@aseredenko
Created September 10, 2016 14:22
Show Gist options
  • Save aseredenko/621bbd190ba3576a441521296528c838 to your computer and use it in GitHub Desktop.
Save aseredenko/621bbd190ba3576a441521296528c838 to your computer and use it in GitHub Desktop.
Gulp function for compresing js files
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