How to run a post-install script after individual execution of "npm install <package>"
You can use npm hook scripts to do something after package is installed.
Create node_modules/.hooks/postinstall
executable and it will be run also after npm install <package>
.
NOTE: I have noticed problems with npm hook scripts between npm version 5.1.0 until 6.0.1. So if you have problems with hooks, check your npm version and upgrade if necessary.