What's the difference between .npmignore
and .gitignore
? What kind of files should I ignore in each?
Asked
Active
Viewed 1.6k times
33

Yangshun Tay
- 49,270
- 33
- 114
- 141
1 Answers
45
.gitignore
lists which files & folders should be omitted from any commits to the repository. You can use this repo for templates of files/folders to in your .gitignore
depending on your environment.
.npmignore
works similarly to .gitignore
, it is used to specify which files should be omitted when publishing the package to NPM. You can read more about it in the .npmignore
docs

peteb
- 18,552
- 9
- 50
- 62