Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
npm7 lifecycle scripts notes
npm event lifecycle
cache add
- prepare (pacote.tarball.stream @npmcli/run-script)
ci
- preinstall (@npmcli/run-script)
- install (@npmcli/run-script)
- postinstall (@npmcli/run-script)
- prepublish (@npmcli/run-script)
- preprepare (@npmcli/run-script)
- prepare (@npmcli/run-script)
- postprepare (@npmcli/run-script)
diff
- prepare (libnpmdiff pacote.tarball @npmcli/run-script) (output suppressed)
exec
- npx
explore
- _explore
install (or install <package-name> -g)
- preinstall (@npmcli/run-script)
- install (@npmcli/run-script)
- postinstall (@npmcli/run-script)
- prepublish (@npmcli/run-script)
- preprepare (@npmcli/run-script)
- prepare (@npmcli/run-script)
- postprepare (@npmcli/run-script)
pack
- prepack (libnpmpack @npmcli/run-script)
- prepare (libnpmpack pacote.tarball @npmcli/run-script) (output suppressed)
- postpack (libnpmpack @npmcli/run-script)
publish
- prepublishOnly (@npmcli/run-script)
- prepack (libnpmpack @npmcli/run-script)
- prepare (libnpmpack pacote.tarball @npmcli/run-script) (output suppressed, not during dry-run)
- postpack (libnpmpack @npmcli/run-script)
- publish (@npmcli/run-script)
- postpublish (@npmcli/run-script)
restart
- restart (lifecycle-cmd)
run
- <user defined> (@npmcli/run-script)
stop
- stop (lifecycle-cmd)
start
- start (lifecycle-cmd)
test
- test (lifecycle-cmd)
version
- preversion (libnpmversion @npmcli/run-script)
- version (libnpmversion @npmcli/run-script)
- postversion (libnpmversion @npmcli/run-script)
prepare is also potentially run during:
- update
- link
- uninstall <package-name>
- prune
- install <package-name>
TODO
- prepare (arborist.build-idea-tree pacote.extract @npmcli/run-script) (output suppressed)
- prepare (arborist.reify pacote.extract @npmcli/run-script) (output suppressed)
- prepare and foregroundScripts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment