pnpm link
命令別名:ln
使目前的區域套件可從整個系統或其他位置存取。
pnpm link <dir>
pnpm link --global
pnpm link --global <pkg>
Options
--dir <dir>, -C
- 預設: 目前資料夾
- 參數類型:路徑字串
將模組資料夾位置設為 <dir>。
pnpm link <dir>
將封裝從 <dir> 資料夾連結到來自您執行此命令處的或透過 --dir 選項指定的封裝的 node_modules。
For example, if you are inside
~/projects/fooand you executepnpm link --dir ../bar, thenfoowill be linked tobar/node_modules/foo.
pnpm link --global
Links package from location where this command was executed or specified via --dir option to global node_modules, so it can be referred from another package with pnpm link --global <pkg>. Also if the package has a bin field, then the package's binaries become available system-wide.
pnpm link --global <模組名稱>
將指定套件(<模組名稱>