I have an app that I'm deploying to Nodejitsu. Recently, they suffered from npm issues that caused my app to go offline for several hours after I tried (and failed) to restart it, as its dependencies could not be installed. I was told that this could be averted in the future by listing all of my dependencies as bundledDependencies
in my package.json, causing the dependencies to be uploaded along with the rest of the application. Which means that I need my package.json to look something like this:
"dependencies": {
"express": "2.5.8",
"mongoose": "2.5.9",
"stylus": "0.24.0"
},
"bundledDependencies": [
"express",
"mongoose",
"stylus"
]
Now, on DRY grounds, this is unappealing. But what's worse is the maintenance: Every time I add or remove a dependency, I have to make the change in two places. Is there a command I can use to sync bundledDependencies
with dependencies
?