Repository navigation
Create .gitattributes to exclude development files from releases - #94
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
There was a problem hiding this comment.
Pull Request Overview
This PR adds a .gitattributes file to exclude development files from release archives and Composer installations using --prefer-dist. This reduces the package size by omitting unnecessary development dependencies, configuration files, and tests when the package is installed in production environments.
Key changes:
- Added
.gitattributesfile withexport-ignoredeclarations for development files - Excluded common development files like tests, docs, linter configs, and build tools
- Added helpful comments explaining the purpose and usage
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## trunk #94 +/- ##
=========================================
Coverage 79.74% 79.74%
Complexity 858 858
=========================================
Files 46 46
Lines 3080 3080
=========================================
Hits 2456 2456
Misses 624 624
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
JasonTheAdams
left a comment
There was a problem hiding this comment.
Thanks for this, @BrianHenryIE!
Currently,
composer installinstalls the package with all its development files,/tests/,.prettierrc.jsetc. which are unnecessary when installing the package in another project.This PR adds
.gitattributesfile in the project root with a list of files markedexport-ignore.