Skip to content

Instantly share code, notes, and snippets.

@bfintal
Created August 29, 2017 15:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bfintal/8b56d99c6bdc963cc391fae3cdaa79c5 to your computer and use it in GitHub Desktop.
Save bfintal/8b56d99c6bdc963cc391fae3cdaa79c5 to your computer and use it in GitHub Desktop.
// Copy all project files into the build directory for packaging
gulp.task( 'buildFiles', [ 'updatePageTemplateSamples', 'premium-lite', 'buildStart', 'styles', 'scripts', 'styles-inc', 'scripts-inc', 'translations', 'translations-update', 'icons', 'google-font-update-list' ], function() { // 'standards-phpcs',
return gulp.src( buildInclude, { base: './' } )
.pipe( gulp.dest( 'dist/' + folderName ) )
.pipe( notify( { message: 'Copy build files complete', onLast: true } ) );
} );
gulp.task( 'buildOtherStuff', ['buildFiles'], function( callback ) {
} );
gulp.task( 'buildZip', ['buildOtherStuff'], function() {
return gulp.src( ['dist/**/*', '!dist/**/.*'], { base: 'dist' } )
.pipe( zip( folderName + '.zip' ) )
.pipe( gulp.dest( 'dist' ) )
.pipe( notify( { message: 'Zipped build complete', onLast: true } ) );
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment