I have npm module with following package.json
{
"name": "my-app",
"version": "0.0.0",
"scripts": {
"prepublish": "bower install",
"build": "gulp"
},
"dependencies": {
"express": "~4.0.0",
"body-parser": "~1.0.1"
},
"devDependencies": {
"gulp": "~3.6.0",
"bower": "~1.3.2"
}
}
When I deploy my app to production, I don't want install devDependecies
, so, I run npm install --production
. But in this case, prepublish
script is called, but it doesn't need to, because I use CDN links in production.
How to call postinstall
script only after npm install
but not after npm install --production
?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…