pnpm patch <pkg>
准备一个用于修补的包(受到 Yarn 中类似命令的启发)。
¥Prepare a package for patching (inspired by a similar command in Yarn).
此命令将导致将包提取到可随意编辑的临时目录中。
¥This command will cause a package to be extracted in a temporary directory intended to be editable at will.
完成更改后,运行 pnpm patch-commit <path>
(<path>
是你收到的临时目录)以生成补丁文件并通过 patchedDependencies
字段将其注册到顶层清单中。
¥Once you're done with your changes, run pnpm patch-commit <path>
(with <path>
being the temporary directory you received) to generate a patchfile and register it into your top-level manifest via the patchedDependencies
field.
用法:
¥Usage:
pnpm patch <pkg name>@<version>