From 36c7f741d709e88bdc3a85685cb6a5e1ec4cd7ea Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 31 Aug 2017 15:55:39 -0400 Subject: [PATCH] zip dist --- gulpfile.js | 15 ++++++++++++++- package.json | 3 ++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index d500a0a4ee..b48a1fea7f 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -13,7 +13,8 @@ webpack = require('webpack-stream'), jeditor = require("gulp-json-editor"), gulpUtil = require('gulp-util'), - child = require('child_process'); + child = require('child_process'), + zip = require('gulp-zip'); var paths = {}; paths.dist = './dist/'; @@ -239,6 +240,7 @@ gulp.task('dist-firefox', ['dist'], function (cb) { return manifest; })) .pipe(gulp.dest(paths.dist)); + return zipDist('dist-firefox'); }); gulp.task('dist-edge', ['dist:edge'], function (cb) { @@ -251,8 +253,19 @@ gulp.task('dist-edge', ['dist:edge'], function (cb) { return manifest; })) .pipe(gulp.dest(paths.dist)); + return zipDist('dist-edge'); }); +gulp.task('dist-other', ['dist'], function (cb) { + return zipDist('dist-other'); +}); + +function zipDist(fileName) { + return gulp.src(paths.dist + '**/*') + .pipe(zip(fileName + '.zip')) + .pipe(gulp.dest(paths.dist)); +} + gulp.task('webfonts', function () { return gulp.src('./webfonts.list') .pipe(googleWebFonts({})) diff --git a/package.json b/package.json index 63eab9ea8c..1b1a5247ad 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,7 @@ "papaparse": "4.3.5", "web-ext": "2.0.0", "child_process": "1.0.2", - "gulp-util": "3.0.8" + "gulp-util": "3.0.8", + "gulp-zip": "4.0.0" } }