Answers:
您可以yarn
通过指定远程URL(HTTPS或SSH)将任何Git存储库(或tarball)添加为依赖项:
yarn add <git remote url> installs a package from a remote git repository.
yarn add <git remote url>#<branch/commit/tag> installs a package from a remote git repository at specific git branch, git commit or git tag.
yarn add https://my-project.org/package.tgz installs a package from a remote gzipped tarball.
这里有些例子:
yarn add https://github.com/fancyapps/fancybox [remote url]
yarn add ssh://github.com/fancyapps/fancybox#3.0 [branch]
yarn add https://github.com/fancyapps/fancybox#5cda5b529ce3fb6c167a55d42ee5a316e921d95f [commit]
(注意:Fancybox v2.6.1在Git版本中不可用。)
yarn add https://github.com/fancyapps/fancybox.git#semver:^3.0
这将拉出最新的主版本,当前是3.5.7。
git
。例如:yarn add ssh://git@github.com/fancyapps/fancybox#3.0
此处描述:https : //yarnpkg.com/en/docs/cli/add#toc-adding-dependencies
例如:
yarn add https://github.com/novnc/noVNC.git#0613d18