Skip to content

Commit 77ff229

Browse files
committed
Separate usage documentation
1 parent ce9758b commit 77ff229

File tree

2 files changed

+24
-30
lines changed

2 files changed

+24
-30
lines changed

README.md

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ It's (kind-of) an alternative to two other great plugins (differences will becom
1616
* [cweagans/composer-patches](https://github.com/cweagans/composer-patches)
1717

1818

19+
**If you're already convinced skip to [Usage Documentation](docs/usage.md).**
20+
1921
## Feature comparison table
2022

2123
| Feature | creativestyle/composer-plugin-patchset | cweagans/composer-patches 1.x | netresearch/composer-patches-plugin |
@@ -33,16 +35,9 @@ It's (kind-of) an alternative to two other great plugins (differences will becom
3335
| Apply patches to root package/directory | yes | no | TBD |
3436

3537
<small>
36-
<sup>1</sup> Root package patching is the exception, please see [applying patches to root package](Applying patches to root package (root project folder)) in usage docs section.
38+
<sup>1</sup> Root package patching is the exception, please see [applying patches to root package](docs/usage.md#applying-patches-to-root-package-root-project-folder) in usage docs.
3739
</small>
3840

39-
40-
Test2: [applying patches to root package](#sth)
41-
42-
Test1: [applying patches to root package](Applying patches to root package (root project folder))
43-
44-
45-
4641
### Some feature hilights
4742

4843
- Apply patches from dedicated composer packages (package your patchset!).
@@ -91,28 +86,6 @@ plugins have done their work so patching source files in vendor will have no eff
9186
purpose. I can hardly imagine a legit use case when it would be desirable that installing package X will automatically
9287
patch some other package Y in your project without explicitly being advertised as a patchset.
9388

94-
## Usage
95-
96-
### Create *patchset* composer package
97-
98-
### Define patches in your root package
99-
100-
### Applying patches to root package (root project folder)
101-
102-
Define patches as you normally would. If your root package is not named the you should use special
103-
`__root__` as package name.
104-
105-
**CAUTION** Since root package cannot be reinstalled once patches are applied they cannot be removed!
106-
This means that if you want to remove patches applied to root package you should reinstall the whole
107-
project manually. The plugin will warn you when this is the case but will not fail. It will try
108-
to apply any new root package patches though.
109-
110-
__New patches will be applied to the root package but then _application order_ is not guaranteed.__
111-
112-
### Options
113-
114-
#### Strip defined number of components when applying patch (`-pX`)
115-
11689
## Running tests
11790

11891
Just start `vendor/bin/phpunit`.

docs/usage.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
## Usage
2+
3+
### Create *patchset* composer package
4+
5+
### Define patches in your root package
6+
7+
### Applying patches to root package (root project folder)
8+
9+
Define patches as you normally would. If your root package is not named the you should use special
10+
`__root__` as package name.
11+
12+
**CAUTION** Since root package cannot be reinstalled once patches are applied they cannot be removed!
13+
This means that if you want to remove patches applied to root package you should reinstall the whole
14+
project manually. The plugin will warn you when this is the case but will not fail. It will try
15+
to apply any new root package patches though.
16+
17+
__New patches will be applied to the root package but then _application order_ is not guaranteed.__
18+
19+
### Options
20+
21+
#### Strip defined number of components when applying patch (`-pX`)

0 commit comments

Comments
 (0)