Skip to content

Commit

Permalink
fix(create-mud): include .gitignore files in created projects (#1945)
Browse files Browse the repository at this point in the history
Co-authored-by: Kevin Ingersoll <kingersoll@gmail.com>
  • Loading branch information
tash-2s and holic committed Nov 30, 2023
1 parent 603f048 commit 6963a9e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/mighty-years-whisper.md
@@ -0,0 +1,5 @@
---
"create-mud": patch
---

Templates now correctly include their respective `.gitignore` files
9 changes: 9 additions & 0 deletions packages/create-mud/scripts/copy-templates.sh
Expand Up @@ -22,3 +22,12 @@ if grep -r -E 'link:' ./dist/templates; then
echo "Linked dependencies found in dist/templates"
exit 1
fi

# Since npm-packlist does not include ".gitignore" files in the packaging process,
# these files are renamed to "gitignore".
# create-create-app automatically renames them back to ".gitignore" upon execution.
find ./dist/templates/* -name ".gitignore" -type f | while read -r file; do
newfile="$(dirname "$file")/gitignore"
echo "Renaming $file to $newfile"
mv "$file" "$newfile"
done
2 changes: 0 additions & 2 deletions templates/.npmignore

This file was deleted.

0 comments on commit 6963a9e

Please sign in to comment.