Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: include a .gitignore file in the create-fuels template #1616

Merged
merged 1 commit into from
Jan 8, 2024

Conversation

Dhaiwat10
Copy link
Member

@Dhaiwat10 Dhaiwat10 commented Jan 5, 2024

Opening this one instead of #1613 because that PR wasn't based off against master

npm doesn't include .gitignore files in package binaries once published to npm. This is why the source code of our templates - once publishsed to npm - didn't have a .gitignore file with it.

To go around this, I have added an extra file called gitignore (without the . at the start) so that npm includes it in the bundle. This file is then renamed to .gitignore by the CLI tool when it extracts the template.

I have also kept the .gitignore since the template folder is built out during our monorepo's build and we want the resulting build artifacts ignored.

This is not the fanciest solution but it is the one I've seen most commonly used by scaffolding CLI projects, even by create-next-app.

Closes #1612

@Dhaiwat10 Dhaiwat10 self-assigned this Jan 5, 2024
@Dhaiwat10 Dhaiwat10 added the bug Issue is a bug label Jan 5, 2024
@Dhaiwat10 Dhaiwat10 marked this pull request as ready for review January 5, 2024 19:14
@Dhaiwat10 Dhaiwat10 enabled auto-merge (squash) January 5, 2024 19:15
Copy link
Contributor

github-actions bot commented Jan 5, 2024

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements
86.9% (+0% 🔼)
6154/7082
🟡 Branches 70.9% 965/1361
🟡 Functions 77.9% 1008/1294
🟢 Lines
86.88% (+0% 🔼)
5899/6790

Test suite run success

1480 tests passing in 262 suites.

Report generated by 🧪jest coverage report action from 1228f00

@Dhaiwat10 Dhaiwat10 merged commit 0cfdbeb into master Jan 8, 2024
13 of 16 checks passed
@Dhaiwat10 Dhaiwat10 deleted the dp/create-fuels-gitgnore-new branch January 8, 2024 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include a .gitignore file in the create-fuels template
3 participants