此為 pnpm9.x 版的文件,現已不再積極維護。
關於最新的文件,請參閱最新發行版本(10.x)。
版本:9.x
pnpm patch-commit <path>
Generate a patch out of a directory and save it (inspired by a similar command in Yarn).
This command will compare the changes frompath
to the package it was supposed to patch, generate a patch file, save the a patch file topatchesDir
(which can be customized by the--patches-dir
option), and add an entry topatchesDependencies
in the top level manifest file.
使用方式:
pnpm patch-commit <path>
path
is the path to a modified copy of the patch target package, it is usually a temporary directory generated bypnpm patch
.
Options
---patches-dir <patchesDir>
The generated patch file will be saved to this directory. By default, patches are saved to thepatches
directory in the root of the project.