Add a compress task to Gulp.

This commit is contained in:
Hyunje Alex Jun 2015-02-12 19:12:00 +00:00
parent 11997131f4
commit 30b4f27e03
2 changed files with 9 additions and 1 deletions

View File

@ -9,7 +9,8 @@ var gulp = require('gulp')
, rimraf = require('gulp-rimraf')
, sass = require('gulp-sass')
, transform = require('vinyl-transform')
, uglify = require('gulp-uglify');
, uglify = require('gulp-uglify')
, zip = require('gulp-zip');
gulp.task('lint', function () {
return gulp.src(['./src/**/*.js', './gulpfile.js'])
@ -122,4 +123,10 @@ gulp.task('watch', function () {
gulp.task('serve', ['connect', 'watch']);
gulp.task('compress', function () {
return gulp.src('./out/**')
.pipe(zip('perfect-scrollbar.zip'))
.pipe(gulp.dest('./out'));
});
gulp.task('default', ['lint', 'build']);

View File

@ -35,6 +35,7 @@
"gulp-rimraf": "^0.1.1",
"gulp-sass": "^1.3.1",
"gulp-uglify": "^1.0.2",
"gulp-zip": "^2.0.2",
"vinyl-transform": "^1.0.0"
},
"scripts": {