Skip to content

Instantly share code, notes, and snippets.

@asharirfan
Created January 5, 2017 05:03
Show Gist options
  • Save asharirfan/8712a7478d86f06dad8ff79d124c08d7 to your computer and use it in GitHub Desktop.
Save asharirfan/8712a7478d86f06dad8ff79d124c08d7 to your computer and use it in GitHub Desktop.
Gulp file for zipping the plugin directory.
/**
* Gulpfile
*
* @since 1.0.0
*/
/**
* Load Plugins.
*
* Load gulp plugins and assing them semantic names.
*/
var gulp = require('gulp');
var zip = require('gulp-zip');
var notify = require('gulp-notify');
/**
* Build Plugin Zip
*/
gulp.task('zip', function () {
return gulp.src( [
// Include
'./**/*',
// Exclude
'!./prepros.cfg',
'!./**/.DS_Store',
'!./sass/**/*.scss',
'!./sass',
'!./node_modules/**',
'!./node_modules',
'!./package.json',
'!./gulpfile.js',
'!./*.sublime-project',
'!./*.sublime-workspace'
])
.pipe ( zip ( 'plugin.zip' ) )
.pipe ( gulp.dest ( '../' ) )
.pipe ( notify ( {
message : 'Your plugin zip is ready.',
onLast : true
} ) );
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment