当我们在npm中安装依赖项时,我们如何克隆git存储库。
"dependencies": {
"<Mydependency>": "<some git url>",
"promise": "^7.0.3",
"react": "^0.14.8",
"react-addons-pure-render-mixin": "^0.14.0",
"react-dom": "^0.14.8",
"react-mixin": "^2.0.2"
},
答案 0 :(得分:3)
使用此: 在package.json
中没有密码:
"Mydependency": "git+https://<somegiturl.git>#<branch>"
密码:
"Mydependency": "git+https://<userName>:<password>@bitbucket.org/myrepo.git#<branch>"