You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Afaict it is quite common to combine multiple package managers, especially setting up web projects (e.g. bower). Therefore a common use case is to keep the package manager in sync without wasting resources.
A typical solution (e.g. by npm) is to provide a postinstall hook that is only run when a local installation finished. So as a solution to the bower problem, I imagine a hook similar too:
postInstallationCommand "bower install"
Nota bene: those hooks are run transitively - when a package as to be built as dependency they are run too.
A quick peek over npm's hooks brings me to this list:
{pre,post}installCommand
{pre,post}testCommand
The latter could be quite useful for custom unittest integration (e.g. code coverage or performance benchmarking).
It might make sense to think over the entire hook system at this point as other user report even more use cases (e.g. #743 for a "clean" hook)
prepublish: Run BEFORE the package is published. (Also run on local npm install without any arguments.)
publish, postpublish: Run AFTER the package is published.
preinstall: Run BEFORE the package is installed
install, postinstall: Run AFTER the package is installed.
preuninstall, uninstall: Run BEFORE the package is uninstalled.
postuninstall: Run AFTER the package is uninstalled.
preversion, version: Run BEFORE bump the package version.
postversion: Run AFTER bump the package version.
pretest, test, posttest: Run by the npm test command.
prestop, stop, poststop: Run by the npm stop command.
prestart, start, poststart: Run by the npm start command.
prerestart, restart, postrestart: Run by the npm restart command. Note: npm restart will run the stop and start scripts if no restart script is provided.
The text was updated successfully, but these errors were encountered:
Afaict it is quite common to combine multiple package managers, especially setting up web projects (e.g.
bower
). Therefore a common use case is to keep the package manager in sync without wasting resources.A typical solution (e.g. by
npm
) is to provide apostinstall
hook that is only run when a local installation finished. So as a solution to the bower problem, I imagine a hook similar too:Nota bene: those hooks are run transitively - when a package as to be built as dependency they are run too.
A quick peek over npm's hooks brings me to this list:
The latter could be quite useful for custom unittest integration (e.g. code coverage or performance benchmarking).
It might make sense to think over the entire hook system at this point as other user report even more use cases (e.g. #743 for a "clean" hook)
FYI: npm provides these hooks:
The text was updated successfully, but these errors were encountered: