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

Add dist and other ignores to .gitignore during create #148

Closed
karlhorky opened this issue Aug 17, 2024 · 2 comments · Fixed by #158
Closed

Add dist and other ignores to .gitignore during create #148

karlhorky opened this issue Aug 17, 2024 · 2 comments · Fixed by #158

Comments

@karlhorky
Copy link

karlhorky commented Aug 17, 2024

During scaffolding with extension@latest create, it would be great to:

  1. Create a .gitignore (if one does not exist)
  2. Add a line for each path which should be ignored (only if the lines are not already present, similar to fix: don't duplicate .gitignore entries microsoft/create-playwright#122)

This is similar to what @jmg-duarte suggested:

But the PR closing issue #54 did not include .gitignore support:

Some ideas for paths that could be ignored:

@jmg-duarte
Copy link

You should be able to just write the .gitignore in this line — https://github.com/extension-js/extension.js/pull/121/files#diff-c79a9d3ab27d3a96709ef6bb93d65fe51be0b7fde2d7f60d5821d2e15f2173aeR64

Something like

fs.writeFile(".gitignore", gitignoreContents, (err) => { /* TODO: error handling */ })

As for the contents, without interaction I'd just cherry pick them from https://github.com/github/gitignore/blob/main/Node.gitignore

And add other paths that might be relevant

@cezaraugusto
Copy link
Member

hi folks, thanks for the feedback!

there is a PR open for this request in #158, feel free to review/suggest changes!

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

Successfully merging a pull request may close this issue.

3 participants