Skip to content

Instantly share code, notes, and snippets.

@salarmehr
Last active April 27, 2020 21:24
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save salarmehr/b62703afb6617f4cacac to your computer and use it in GitHub Desktop.
Save salarmehr/b62703afb6617f4cacac to your computer and use it in GitHub Desktop.
// a gulp task to clean up vendor folder files for production machine.
var gulp = require('gulp');
var zip = require('gulp-zip');
gulp.task('zip-vendor', function () {
return gulp.src(
[
'vendor/**/*',
'!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'
// if you think there is more let me know.
],
{base: '.'}
)
.pipe(zip('vendor.zip'))
.pipe(gulp.dest(paths.dist));
})
@eddiriarte
Copy link

twig uses 'doc' and 'test' instead of 'docs' and 'tests'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment