uetchy / create-create-app

⚡️ Create your own `create-something` app.
MIT License
97 stars 24 forks source link

`.gitignore` does not get copied from template #38

Closed iVilja closed 2 years ago

iVilja commented 2 years ago

npm init create-app won't copy the .gitignore files from the templates into the generated packages.

It is caused by the fact that when you publish a NPM package, .gitignore files are ignored. (https://github.com/npm/npm/issues/3763)

One workaround is to use a file like gitignore and copy it to .gitignore when doing generation.

iVilja commented 2 years ago

I would like to make a PR for using the workaround mentioned above. Would you be OK with this? @uetchy

BTW it's also how some other projects such as create-react-app are doing (https://github.com/facebook/create-react-app/blob/c20ccecfa1cf130a47d37908dc54959c618ce8ea/packages/react-scripts/scripts/init.js#L257-L271)