Skip to content

Commit

Permalink
Add .gitattributes file
Browse files Browse the repository at this point in the history
This removes development files and folders from release archives, and makes them unavailable when using Composer with `--prefer-dist`.
  • Loading branch information
GaryJones committed Jul 24, 2023
1 parent 179aa52 commit 1ee2609
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Exclude these files from release archives.
# This will also make them unavailable when using Composer with `--prefer-dist`.
# If you develop for CAP using Composer, use `--prefer-source`.
# https://blog.madewithlove.be/post/gitattributes/

/.github/ export-ignore
/bin/ export-ignore
/src/__mocks__/ export-ignore
/src/__tests__/ export-ignore
/tests/ export-ignore
/.distignore export-ignore
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.phpcs.xml.dist export-ignore
/phpunit.xml.dist export-ignore
/CHANGELOG.md export-ignore
/phpunit.xml.dist export-ignore

# Auto detect text files and perform LF normalization
# https://pablorsk.medium.com/be-a-git-ninja-the-gitattributes-file-e58c07c9e915

* text=auto

# The above will handle all files NOT found below

*.md text
*.php text
*.inc text

0 comments on commit 1ee2609

Please sign in to comment.