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生成的临时目录。
选项
🌐 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.