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

433 Views Asked by At

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 ?

2

There are 2 best solutions below

3
On BEST ANSWER

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

install, postinstall: Run AFTER the package is installed.

0
On

It isn't reserved, rather it's one of npm's built-in commands.

Meaning rather then npm run install, you'd execute npm install.