Considering the npm project, npm install
itself will only install/clone the git repos, but also interpret the script section.
{ "scripts" :
{ "install" : "scripts/install.js"
, "postinstall" : "scripts/install.js"
, "uninstall" : "scripts/uninstall.js"
}
}
You could declare a script in the install
or postinstall
step which would add your hooks in the cloned repos.