Skip to content

Generate .gitignore at the same time README.md and package.json are created (before npm install) #6452

Open
@TomasHubelbauer

Description

@TomasHubelbauer

I would like to propose that .gitignore gets created at the same time README.md and package.json do. Right now from experimentation it seems like the two do get created first, then npm install is run and then a bunch of other files including .gitignore gets dropped into the directory.

There's probably a reason for that, maybe the .gitignore gets copied from the scripts package, I don't know, but still, maybe an interim .gitignore could be created which ignores node_modules?

The reason I ask for this is because when I run create-react-app . (create in the current directory) in the VS Code Terminal, VS Code tries to calculate changes at npm-install-time and often runs into the too may changes state, which is a wasted effort ultimately, because at the end of the CRA creation, the Git ignore file gets dropped and the resulting set of changes is correct.

Providing the Git ignore file upfront (before npm install) or providing an interim one to be replaced by the filed one would solve this issue and make the experience a bit nicer.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions