Tip
By default npm publish
will publish all files within a working directory - excluding .gitignore
/ .npmignore
/ package-lock.json
.
This is typically fine, but often I find myself leaving un-staged files (e.g. TODO.txt
files) in a repository root and these of course get accidently taken along for the publish ride.
Helper script npm-publish-wrap.sh
will catch calls to npm publish
and:
- Ensure I'm at the root of a repository (
.git
directory) found.