gitignore icon indicating copy to clipboard operation
gitignore copied to clipboard

more compatible node_modules ignore for npm publish

Open leavesster opened this issue 2 years ago • 1 comments

Reasons for making this change:

git will ignore node_modules directory in any nest directories whether we write node_modules/ or node_module. However npm only ignore node_modules in subdirectories when we write node_modules in .gitignore if .npmignore is not exist.

# when we write `node_modules/` in .gitignore
npm publish

# upload node_modules/xx.js
npm notice aa/node_modules/xx.js
# when we write `node_modules` in .gitignore
npm publish

# will not upload aa/node_modules/xx.js

leavesster avatar Aug 07 '23 08:08 leavesster

This PR is stale because there have been no updates in 90 days. It will close after 180 days of inactivity. Leave a comment if you want to keep it open :smile:

github-actions[bot] avatar Jun 09 '25 16:06 github-actions[bot]