0.0.4 • Published 5 years ago
npm-lifecycle-hooks v0.0.4
npm lifecycle hooks
a study of npm lifecycle hooks.
see: npm-scripts: How npm handles the "scripts" field
this repo demonstrates all npm predefined hooks (as of v6.9.0) that, if defined, will run when you run certain npm (or yarn, if you're into that sort of thing) commands where these hooks attached.
for example, when you run npm publish
(or yarn publish
, if you're into that sort of thing) the following hooks are invoked:
- preversion
- version
- prepublish
- prepare
- prepublishOnly
- prepack
- postpack
- publish
- postpublish
- postversion
the scripts in scripts
folder actually does nothing except console.log
ging its hook name.