From 30b4f27e038d24bc9939efbccc6ee33929c6dd97 Mon Sep 17 00:00:00 2001 From: Hyunje Alex Jun Date: Thu, 12 Feb 2015 19:12:00 +0000 Subject: [PATCH] Add a `compress` task to Gulp. --- gulpfile.js | 9 ++++++++- package.json | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index 9026fbc..d7678cb 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -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']); diff --git a/package.json b/package.json index 27ee20d..05bb68a 100644 --- a/package.json +++ b/package.json @@ -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": {