Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(patch-commit): clarify #476

Merged
merged 5 commits into from
Nov 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions docs/cli/patch-commit.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,20 @@ id: patch-commit
title: "pnpm patch-commit <path>"
---

Generate a patch out of a directory (inspired by a similar command in Yarn).
Generate a patch out of a directory and save it (inspired by a similar command in Yarn).

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 `patchesDependencies` in the top level manifest file.

Usage:

```sh
pnpm patch-commit <patchDir>
pnpm patch-commit <path>
```

* `path` is the path to a modified copy of the patch target package, it is usually a temporary directory generated by [`pnpm patch`](./patch).

## Options

### ---patches-dir &lt;dir>
### ---patches-dir &lt;patchesDir>

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.