npm version
commits the change to package.json and creates a tag. Is there a way to prevent commit hook from being executed while using this command?
Not sure why this functionality didn't exist in npm
before, but I contributed it a little while ago, as I needed it myself. It shipped with [email protected]
. To use it, set the config option commit-hooks = false
in your .npmrc
and the underlying git
call will not run commit hooks when creating the version commit. If you only want to disable commit hooks on a single versioning, you can run something similar to:
npm version --no-commit-hooks minor
or alternatively:
npm version --commit-hooks false minor
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With