npm8中文文档
一个包是:
<name>@<version>
(c)<name>@<tag>
<name>
git
url,在克隆时会导致 (a)。即使你从不发布你的包,如果你只是想写一个 node 程序(a),你仍然可以获得使用 npm 的很多好处,也许你还想在打包后能够轻松地安装它成一个 tarball (b)。
Git url 可以是以下形式:
git://github.com/user/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
commit-ish
可以是可以作为参数提供给 git checkout
的任何标记、sha 或分支。默认值是存储库用作其默认分支的任何内容。