Skip to content

Commit 315f8ed

Browse files
committed
Apply for export-ignore towards better release packages
When used as a dependency in other projects, we don't want the release packages to include any development file. This includes CI files, test files, docs... This is useful to both: - Reduce the package sizes noticeably. - Ensure that composer, by default, (--prefer-dist) doesn't include them. If anybody prefers to get the complete version they always can use --prefer-source or clone the repository. This is considered good practice, as far as there can be problems with tests and other stuff when the dependencies include everything.
1 parent ff540d2 commit 315f8ed

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.gitattributes

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# Ignore all these files for release packages.
2+
# Using Composer `--prefer-dist` will not include these files.
3+
# Use `--prefer-source` to include them.
4+
# See https://blog.madewithlove.be/post/gitattributes/
5+
.gitattributes export-ignore
6+
.gitignore export-ignore
7+
.phplint.yml export-ignore
8+
CHANGELOG.md export-ignore
9+
phpunit.xml.dist export-ignore
10+
README.md export-ignore
11+
/.github export-ignore
12+
/moodle/Tests export-ignore
13+
114
# The generic_files_linendings test is checking for crlf line endings and warns about them.
215
# This must be specified as a .gitattribute to prevent git updating it to be LF on commit.
316
/moodle/Tests/fixtures/generic_files_lineendings.php eol=crlf

0 commit comments

Comments
 (0)