Created
January 5, 2017 05:03
-
-
Save asharirfan/8712a7478d86f06dad8ff79d124c08d7 to your computer and use it in GitHub Desktop.
Gulp file for zipping the plugin directory.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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