Update gulp zip task
This commit is contained in:
parent
8f86e768d0
commit
271c50afa3
50
gulpfile.js
50
gulpfile.js
|
|
@ -178,41 +178,38 @@ gulp.task('zip', () => {
|
||||||
console.log(`Zip archive will be saved to ${zipPath}.`);
|
console.log(`Zip archive will be saved to ${zipPath}.`);
|
||||||
|
|
||||||
return gulp.src([
|
return gulp.src([
|
||||||
'**/*.*',
|
'**/*',
|
||||||
'artisan',
|
'**/.gitignore',
|
||||||
'LICENSE',
|
'**/.htaccess',
|
||||||
'!.babelrc',
|
'.env.example',
|
||||||
'!.eslintrc.js',
|
// Exclude unnecessary files
|
||||||
'!.eslintignore',
|
'!.gitignore',
|
||||||
'!.editorconfig',
|
|
||||||
'!.travis.yml',
|
|
||||||
'!{.env,.env.testing}',
|
|
||||||
'!{.git,.git/**}',
|
|
||||||
'!{.gitignore,.gitmodules,.gitattributes}',
|
|
||||||
'!gulpfile.js',
|
|
||||||
'!composer.*',
|
'!composer.*',
|
||||||
'!yarn.lock',
|
'!gulpfile.js',
|
||||||
'!plugins/**',
|
|
||||||
'plugins/',
|
|
||||||
'!phpunit.xml',
|
|
||||||
'!package.json',
|
|
||||||
'!{tests,tests/**}',
|
|
||||||
'!ISSUE_TEMPLATE.md',
|
'!ISSUE_TEMPLATE.md',
|
||||||
'!{coverage,coverage/**}',
|
'!package.json',
|
||||||
'!{node_modules,node_modules/**}',
|
'!phpunit.xml',
|
||||||
'!storage/textures/**',
|
'!yarn.lock',
|
||||||
|
// Exclud unnecessary directories
|
||||||
|
'!plugins/**',
|
||||||
'!resources/assets/{src,src/**}',
|
'!resources/assets/{src,src/**}',
|
||||||
'!resources/assets/dist/**/{maps,maps/**}',
|
'!resources/assets/dist/**/{maps,maps/**}',
|
||||||
// do not pack packages for developments
|
'!resources/lang/overrides/**',
|
||||||
|
'!resources/views/overrides/**',
|
||||||
|
'!storage/textures/**',
|
||||||
|
'!{coverage,coverage/**}',
|
||||||
|
'!{node_modules,node_modules/**,node_modules/**/.gitignore}',
|
||||||
|
'!{tests,tests/**}',
|
||||||
|
// Exclude require-dev packages
|
||||||
'!vendor/fzaninotto/**',
|
'!vendor/fzaninotto/**',
|
||||||
|
'!vendor/mikey179/**',
|
||||||
'!vendor/mockery/**',
|
'!vendor/mockery/**',
|
||||||
'!vendor/phpunit/**',
|
'!vendor/phpunit/**',
|
||||||
'!vendor/symfony/css-selector/**',
|
'!vendor/symfony/css-selector/**',
|
||||||
'!vendor/symfony/dom-crawler/**',
|
'!vendor/symfony/dom-crawler/**',
|
||||||
'!vendor/mikey179/vfsStream/**',
|
])
|
||||||
], { dot: true })
|
|
||||||
.pipe(zip(zipPath))
|
.pipe(zip(zipPath))
|
||||||
.pipe(notify('Don\'t forget to compile Stylus & ES2015 files before publishing a release!'))
|
.pipe(notify('Don\'t forget to build front-end resources before publishing a release!'))
|
||||||
.pipe(gulp.dest('../'))
|
.pipe(gulp.dest('../'))
|
||||||
.pipe(notify({ message: `Zip archive saved to ${zipPath}!` }));
|
.pipe(notify({ message: `Zip archive saved to ${zipPath}!` }));
|
||||||
});
|
});
|
||||||
|
|
@ -233,10 +230,11 @@ function convertNpmRelativePath(paths) {
|
||||||
|
|
||||||
function clearCache() {
|
function clearCache() {
|
||||||
return del([
|
return del([
|
||||||
'storage/logs/*',
|
'storage/logs/*.log',
|
||||||
'storage/testing/*',
|
'storage/testing/*',
|
||||||
'storage/debugbar/*',
|
'storage/debugbar/*',
|
||||||
'storage/update_cache/*',
|
'storage/update_cache/*',
|
||||||
|
'storage/update_cache',
|
||||||
'storage/yaml-translation/*',
|
'storage/yaml-translation/*',
|
||||||
'storage/framework/cache/*',
|
'storage/framework/cache/*',
|
||||||
'storage/framework/sessions/*',
|
'storage/framework/sessions/*',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user