Created
September 23, 2017 08:52
-
-
Save salarmehr/07ce72c11feddade7e02367a605b6b33 to your computer and use it in GitHub Desktop.
Making vendor folder smaller for product deployment.
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
gulp.task('zip-vendor', function () { | |
return gulp.src( | |
[ | |
'vendor/**/*', | |
'!vendor/kartik-v/**', | |
'!vendor/**/*.md', | |
'!vendor/**/*.txt', | |
'!vendor/**/*.pdf', | |
'!vendor/**/LICENSE', | |
'!vendor/**/CHANGES', | |
'!vendor/**/README', | |
'!vendor/**/VERSION', | |
'!vendor/**/composer.json', | |
'!vendor/**/.gitignore', | |
'!vendor/**/docs', | |
'!vendor/**/docs/**', | |
'!vendor/**/tests', | |
'!vendor/**/tests/**', | |
'!vendor/**/unitTests', | |
'!vendor/**/unitTests/**', | |
'!vendor/**/.git', | |
'!vendor/**/.git/**', | |
'!vendor/**/examples', | |
'!vendor/**/examples/**', | |
'!vendor/**/build.xml', | |
'!vendor/**/phpunit.xml', | |
'!vendor/**/phpunit.xml.dist', | |
'!vendor/**/mpdf/ttfonts/**', | |
], | |
{base: '.'} | |
) | |
.pipe(zip('vendor.zip')) | |
.pipe(gulp.dest(paths.deploy)); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Unfortunately most package development do not employ composer facility to prune their packages.