Search code examples
node.jsnpmnpm-installnpm-run

Does a npm run-script named "install" has special status?


I have a package.json with both

"dependencies": {
  "d3": "~3.5.5",
  "forever": "^0.14.1"
},
"scripts": {
   "install":   "make -f install.makefile"
   "data":  "make -f data.makefile core",
   "serve": "node ./node_modules/.bin/forever ./node_modules/.bin/http-server"

}

When I check my scripts by running npm run, I get :

enter image description here

I wonder if "install" is a reserved keywords, since it is not grouped with other scripts.

Is install a reserved word with special behavior when in packages.json's scripts object ?


Solution

  • From the docs: https://docs.npmjs.com/misc/scripts

    install, postinstall: Run AFTER the package is installed.