pnpm patch-commit <path>
从目录中生成补丁并保存它(受到 Yarn 中类似命令的启发)。
¥Generate a patch out of a directory and save it (inspired by a similar command in Yarn).
此命令将比较 path 和它要修补的包的更改,生成补丁文件,将补丁文件保存到 patchesDir(可通过 --patches-dir 选项自定义),并向 patchedDependencies 添加条目。
¥This command will compare the changes from path to the package it was supposed to patch, generate a patch file, save the a patch file to patchesDir (which can be customized by the --patches-dir option), and add an entry to patchedDependencies.
用法:
¥Usage:
pnpm patch-commit <path>
-
path是补丁目标包的修改副本的路径,它通常是pnpm patch生成的临时目录。¥
pathis the path to a modified copy of the patch target package, it is usually a temporary directory generated bypnpm patch.
选项
¥Options
---patches-dir <patchesDir>
生成的补丁文件将保存到该目录下。默认情况下,补丁保存在项目根目录的 patches 目录下。
¥The generated patch file will be saved to this directory. By default, patches are saved to the patches directory in the root of the project.