Why do we need both npm install and npm install base1 in the prestart section?
If npm install itself retrieves base1 from Git then why do we need to mention npm install base1 in prestart?
For one Node.js program I saw the package.json shown here:
{
"name": "user01",
"version": "1.5.1",
"description": "",
"author": "",
"private": "true",
"main": "app.js",
"scripts": {
"start": "node app.js",
"prestart": "npm install && npm install base1 && npm install base2"
},
"dependencies": {
"ain2": "*",
"body-parser": "^1.15.0",
"express": "^4.13.3",
"uuid": "*",
"request": "^2.69.0",
"traverse": "*",
"base1": "git+ssh://xxxxxxxxxxx/base1.git",
"base2": "git+ssh://xxxxxxxxxx/base2.git"
}
}
The first run is to get the packages, the second is to basically initialize them.
npm install
npm install package
Source: NPMJS