Skip to content

Commit 3658181

Browse files
committed
Usage docs improvements
1 parent a23ec23 commit 3658181

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

docs/usage.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,35 +56,39 @@ _Use this way to easily distribute your patchset and use it in multiple projects
5656

5757
## Define patches in your root package
5858

59+
Apart from defining patches in a `patchset` type package, you can also do that in your main `composer.json`.
60+
61+
Just add the `"extra": {"patchset": {}}` configuration the same way as in a patchset package.
62+
5963
# JSON configuration reference
6064

6165
## Patch properties
6266

63-
### `description` (string, mandatory)
67+
#### `description` (string, mandatory)
6468

6569
Short description (or name) of your patch. Keep it short as it will be displayed during patching.
6670

67-
### `filename` (string, mandatory)
71+
#### `filename` (string, mandatory)
6872

6973
Path to your diff file relative to the root of your patchset. Patches can be stored anywhere within
7074
the package.
7175

72-
### `version-constraint` (string, default: `"*"`)
76+
#### `version-constraint` (string, default: `"*"`)
7377

7478
A composer semver version constraint. If specified then the patch application will be attempted
7579
only if the target package's version matches the constraint.
7680

7781
See [composer documenation](https://getcomposer.org/doc/articles/versions.md) for exact syntax reference.
7882

79-
### `strip-path-components` (integer, default: `1`)
83+
#### `strip-path-components` (integer, default: `1`)
8084

8185
How many leading path components to strip from filenames in diff when applying the patch.
8286

8387
This has the same effect as the `-p{x}` switch of the patch command, where `{x}` is the value of this parameter.
8488

8589
For 99% of the patches this will be the default `1`. Set this only if your patch was generated in some non-standard way.
8690

87-
### `method` (string, default: `"patch"`)
91+
#### `method` (string, default: `"patch"`)
8892

8993
There are two methods of application: `patch` and `git`.
9094

0 commit comments

Comments
 (0)