const gulp = require('gulp'); const uglify = require('gulp-uglify'); const pump = require('pump'); const zip = require('gulp-zip'); function js(done) { pump([ gulp.src('assets/js/*.js', {sourcemaps: true}), uglify(), gulp.dest('assets/built/', {sourcemaps: '.'}) ], done()); } exports.js = js; function zipper(done) { var targetDir = 'dist/'; var themeName = require('./package.json').name; var filename = themeName + '.zip'; pump([ gulp.src([ '**', '!node_modules', '!node_modules/**', '!dist', '!dist/**', '!*.ignore', '!gulpfile.js', '!package-lock.json' ]), zip(filename), gulp.dest(targetDir) ], done()); } exports.zip = zipper;