Skip to content

Instantly share code, notes, and snippets.

@bacoords
Created December 28, 2017 22:37
Show Gist options
  • Save bacoords/1820d06ab5eee549eadb0fdabe47d28e to your computer and use it in GitHub Desktop.
Save bacoords/1820d06ab5eee549eadb0fdabe47d28e to your computer and use it in GitHub Desktop.
// Example of how to zip a directory
var gulp = require('gulp');
var zip = require('gulp-zip');
gulp.task('zip', function () {
return gulp.src([
'./**/*',
'!./{node_modules,node_modules/**/*}',
'!./assets/{sass,sass/*}',
'!./gulpfile.js',
'!./package.json',
'!./package-lock.json'
])
.pipe(zip('my-theme-folder.zip'))
.pipe(gulp.dest('./../'));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment