Closed SimonAlling closed 3 years ago
Seems like .gitignore
is included in the tarball created by npm pack
, but not in the actual directory created by npm install -g
(e.g. ~/.npm/node_modules/lib/node_modules/userscripter/bootstrap
).
Turns out .gitignore
is in a sense included in said directory, but it's automatically renamed to .npmignore
.
https://github.com/npm/npm/issues/3763 :upside_down_face:
Interestingly, the behavior is different depending on how Userscripter is installed:
npm install -g userscripter
npm pack && npm install -g userscripter-1.5.0.tgz
npm install -g .
(Legend: template directory ends up with ❌ = .npmignore
; ✅ = .gitignore
.)
So it appears that it works as intended if no tarball is involved.
Possibly relevant: https://github.com/npm/npm/commit/2c6acb96c71c16106965d5cd829b67195dd673c7