Viv*_*pta 5 git repository angularjs reactjs package.json
我有一个 git 存储库,并希望将此存储库用作其他项目的 package.json 文件中的依赖项,以便在运行 npm 命令时可以下载它。谁能帮我吗?
尝试这个。
"dependencies": {
"<repo>": "<user>/<repo>#<branch>",
}
Run Code Online (Sandbox Code Playgroud)
例子:
"dependencies": {
"botkit": "jonchurch/botkit#master",
}
Run Code Online (Sandbox Code Playgroud)
来自NPM 文档:
Git URL 作为依赖项
git://github.com/user/project.git#commit-ish
git+ssh://user@hostname:project.git#commit-ish
git+ssh://user@hostname/project.git#commit-ish
git+http://user@hostname/project/blah.git#commit-ish
git+https://user@hostname/project/blah.git#commit-ish
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5802 次 |
| 最近记录: |