npm install fancyapps/fancybox#v2.6.1 --save` とすると、v2.6.1タグのfancyboxパッケージがインストールされます。この動作はdocsに記載されています。
yarn`でこれを行うにはどうすればいいでしょうか?
このコマンドが正しい選択肢なのでしょうか?yarn docs](https://yarnpkg.com/lang/en/docs/cli/add/)にはこのフォーマットに関する記述はありません。
yarn add fancyapps/fancybox#v2.6.1`.
リモートURL(HTTPSまたはSSH)を指定することで、任意のGitリポジトリ(またはtarball)をyarn
の依存関係として追加することができる:
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 'ssh://[email protected]:myproject.git#<branch,tag,commit>'
npm install 'ssh://[email protected]:myproject.git#<branch,tag,commit>'