Skip to content
This repository has been archived by the owner on Dec 30, 2021. It is now read-only.

Add support for creating .gitignore from template #164

Open
jihchi opened this issue Jul 2, 2020 · 5 comments
Open

Add support for creating .gitignore from template #164

jihchi opened this issue Jul 2, 2020 · 5 comments
Assignees

Comments

@jihchi
Copy link
Contributor

jihchi commented Jul 2, 2020

It seems like currently create-snowpack-app won't pick up .gitignore from template?

https://github.com/pikapkg/create-snowpack-app/blob/a795622011744fe8aee8e712b67704bac30edad8/packages/create-snowpack-app/index.js#L93-L96

Am I misunderstanding here? it would be nice if we can derive .gitignore from template if there is one.

@stramel
Copy link
Contributor

stramel commented Jul 2, 2020

I've ran into issues with this in the past on generators, I can take a look here soon

@FredKSchott
Copy link
Owner

Thanks @stramel ! Hopefully it's just that we're overwriting it naively. If a template provides their own, we should honor that

@stramel
Copy link
Contributor

stramel commented Jul 3, 2020

@FredKSchott .gitignore has always been problematic in template generators. npm/npm#1862

The workaround that I have seen is for the template to have a gitignore or something like similar that we can handle as a special case and rename it. However, if a template doesn't do this, the file still becomes .npmignore.

I'm looking for direction on this.

@jihchi
Copy link
Contributor Author

jihchi commented Jul 4, 2020

Just FYI. create-react-app takes gitignore and rename it to .gitignore. (code reference)

@stramel
Copy link
Contributor

stramel commented Jul 4, 2020

@jihchi yep, I remember participating in the issue that discussed the solution. Couldn't remember what it was though.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants