pnpm link
别名: ln
使当前本地包可在系统范围内或其他位置访问。
pnpm link <dir|pkg name>
pnpm link
配置项
pnpm link<dir>
Links package from <dir>
directory to node_modules
of package from where you're executing this command.
例如,如果你在
~/projects/foo
下,并且执行pnpm link ../bar
,那么将在foo/node_modules/bar
中创建指向bar
的链接。
pnpm link
Links package from location where this command was executed to global node_modules
, so it can be referred from another package with pnpm link <pkg>
. 此外,如果软件包具有 bin
字段,则软件包的二进制文件将在系统范围内可用。
pnpm link <pkg>
Links the specified package (<pkg>
) from global node_modules
to the node_modules
of package from where this command was executed.