我们已经构建了自己的应用程序,以包括三个仓库:部署私有存储库作为依赖
- 前端(这一部署)
- 共享
- 核心
这些都是私人GitHub上的Git仓库。
我的package.json文件的相关部分看起来是这样的:
"dependencies": {
"express": "2.5.x",
"coffeecup": "0.3.x",
"socket.io": "0.8.x",
"connect-mongodb": "1.x",
"app-core": "git+ssh://[email protected]:...git",
"app-shared": "git+ssh://[email protected]:...git"
},
"devDependencies": {
"mongoskin": "*",
"bcrypt": "*",
"libxml-to-js": "0.3.x"
},
"bundleDependencies": [
"app-core",
"app-shared"
],
"analyze": true
当我部署到Nodejitsu使它工作的唯一办法是在我部署库的devDependencies已经共享和核心的依赖,但这似乎是错误的解决方案,因为devDependencies是针对开发而非生产的。
我也试过Shrinkwrapping但没有用。
有谁知道更好的解决方案?
在Nodejitsu你不能拥有你的私人SSH密钥,所以私人代表无法获取,因此我需要bundleDependencies。 – webjay 2012-03-20 08:03:23