noelm
noelm

Reputation: 1302

npm: How to just run postinstall?

In my node.js project, how could I just run the postinstall script, without running install before?

FYI, this is my package.json :

{
  "name": "gestionclientjs",
  ...,
  "dependencies": {
  ...
  },
  "repository": {},
  "devDependencies": {
  ...
  },
  "engines": {
    "node": ">=0.10.0"
  },
  "scripts": {
    "test": "grunt test",
    "postinstall" : "bower install && node ./app/server/dbSeed.js",
    "start": "node app/server/app.js"
  }
}

For now, I run :

npm install

in my project, but I want to run

npm postinstall

when I want (and when I'm sure dependencies are ok).

Upvotes: 84

Views: 97373

Answers (1)

robertklep
robertklep

Reputation: 203304

You can run individual script entries using npm run SCRIPTNAME:

$ npm run postinstall

Upvotes: 113

Related Questions