node.js - Post install after installing package? -


i've got scripts tag in package.json file:

  "scripts": {     "postinstall": "<command>"   } 

whenever i'm running npm install postinstall commands runs properly. if i'm passing arguments npm install command, example when installing new package: npm install <dependency> --save-dev. won't run postinstall command.

is there way postinstall run if there arguments in npm install command?

i think getting confused how packages work. package has it's own dependencies, post-installs , pre-installs. when install package this:

npm install <dependency>

this looks @ package want install , installs along it's dependencies, if package want install has preinstall or postinstall command, invokes them. only package, not yours.

when npm install, installing your package, , therefore calls your package's postinstall command.


Comments

Popular posts from this blog

How to check data type in C++? -

javascript - Is getTimezoneOffset() stable during daylight saving transition? -

sql server - SQL Query returns one result, does not return 0 or NULL result -