Skip to content

Commit a938816

Browse files
Freddixxarcanis
andauthored
docs: make usage of the patch protocol clearer (#3213)
* fix(docs): Made usage of the patch protocol clearer * Update README.md * Update protocols.md Co-authored-by: Maël Nison <[email protected]>
1 parent ad3bc7e commit a938816

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/gatsby/content/features/protocols.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ The `patch:` protocol is meant to be used with [`yarn patch`](/cli/patch) and [`
6565
1. Find a package you want to patch (let's say `lodash@^1.0.0`)
6666
2. Run `yarn patch lodash`
6767
3. Edit the folder the command generated
68-
4. Once you're done, run `yarn patch-commit <path> > my-patch.diff`
68+
4. Once you're done, run `yarn patch-commit -s <path>`
6969
5. In your manifest, change the dependency from `^1.0.0` to:
7070

7171
```
72-
patch:lodash@^1.0.0#./my-patch.diff
72+
patch:lodash@^1.0.0#path/to/generated/file.patch
7373
```
7474

7575
Note that if you wish to update a transitive dependency (ie not directly yours), it's perfectly possible to use the [`resolutions` field](/configuration/manifest#resolutions).

packages/plugin-patch/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This plugin is included by default in Yarn.
1010

1111
1. Run `yarn patch <package name>` and edit the resulting folder.
1212

13-
2. Once you're ready, run `yarn patch-commit <patch folder>`, and store the result inside a `.patch` file.
13+
2. Once you're ready, run `yarn patch-commit -s <patch folder>` to store the result inside a `.patch` file.
1414

1515
3. Add the `patch:` protocol to your dependencies as such:
1616

0 commit comments

Comments
 (0)