Last Updated: February 25, 2016
·
8.925K
· zwigby

Node.js NPM preinstall

If you need to install a custom module or run anything before NPM does its install you can use scripts/preinstall.

{
  "name" : "your-app",
  "version" : "0.0.1",
  "scripts" : {
    "preinstall" : "npm install ./custom_modules/backend-common"
  }
}

This is great for doing anything when "npm install" happens.