From 4fb6ae3b1b209a4b26632ecf66d9d36682155438 Mon Sep 17 00:00:00 2001 From: Bruno Dias Date: Mon, 13 Apr 2015 03:00:13 -0300 Subject: [PATCH] Add 'zip' task --- .gitignore | 3 ++- Gulpfile.js | 7 +++++++ package.json | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index e13c8ee..ca7298e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules build -dist \ No newline at end of file +dist +dist.zip \ No newline at end of file diff --git a/Gulpfile.js b/Gulpfile.js index 2dcde9a..da3693f 100644 --- a/Gulpfile.js +++ b/Gulpfile.js @@ -15,6 +15,7 @@ var watchify = require('watchify'), minifyCSS = require('gulp-minify-css'), uglify = require('gulp-uglify'), buffer = require('vinyl-buffer'), + zip = require('gulp-zip'), _ = require('lodash'); var reload = browserSync.reload; @@ -129,4 +130,10 @@ gulp.task('coffee-dist', function () { gulp.task('dist', ['html-dist', 'img-dist', 'less-dist', 'coffee-dist'], function () { return; +}); + +gulp.task('zip', ['dist'], function () { + return gulp.src('dist/**') + .pipe(zip('dist.zip')) + .pipe(gulp.dest('.')); }); \ No newline at end of file diff --git a/package.json b/package.json index e9715d0..4c82dcf 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "gulp-minify-css": "^1.0.0", "gulp-uglify": "^1.2.0", "gulp-util": "^3.0.4", + "gulp-zip": "^3.0.2", "lodash": "^3.6.0", "vinyl-buffer": "^1.0.0", "vinyl-source-stream": "^1.1.0",