fix(build): exclude dev vendor/ from the plugin ZIP#37
Merged
Conversation
…ugin zip A local 'composer install' at the repo root creates vendor/ with dev tools (phpstan.phar ~23MB, php_codesniffer, WP/Woo stubs). build.sh's rsync copied it into the plugin ZIP, bloating it from ~250KB to ~8MB and shipping dev dependencies (a WordPress.org rejection). Anchor the excludes to the plugin root so only the top-level vendor/ is dropped — admin/js/vendor/ (bundled Chart.js) is preserved. Also exclude .git/.github/node_modules/tests/composer + lint configs.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A local root
composer install(dev tools: phpstan.phar ~23MB, phpcs, stubs) createdvendor/, whichbuild.sh's rsync bundled into the ZIP — bloating it to ~8MB and shipping dev dependencies (a WordPress.org rejection). Anchors the rsync excludes to the plugin root so only the top-levelvendor/is dropped whileadmin/js/vendor/(bundled Chart.js) is kept. Verified:.orgZIP back to ~244KB, Chart.js present, no phpstan/phpcs/stubs.