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
Post a Comment