Skip to content

Commit eb62cdc

Browse files
committed
update help message
1 parent 18a27cb commit eb62cdc

File tree

1 file changed

+40
-14
lines changed

1 file changed

+40
-14
lines changed

src/index.ts

Lines changed: 40 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,28 @@ Usage:
9191
9292
./patches/<package-name>+<version>.patch
9393
94+
Options:
95+
96+
${chalk.bold("--patch-dir <dirname>")}
97+
98+
Specify the name for the directory in which the patch files are located.
99+
100+
${chalk.bold("--ignore-errors")}
101+
102+
Try to apply all of the patches, even if some of them fail.
103+
104+
${chalk.bold("--reverse")}
105+
106+
Un-applies all patches.
107+
108+
Note that this will fail if the patched files have changed since being
109+
patched. In that case, you'll probably need to re-install 'node_modules'.
110+
111+
This option was added to help people using CircleCI avoid an issue around caching
112+
and patch file updates (https://github.com/ds300/patch-package/issues/37),
113+
but might be useful in other contexts too.
114+
115+
94116
2. Creating patch files
95117
=======================
96118
@@ -103,28 +125,32 @@ Usage:
103125
104126
Options:
105127
106-
${chalk.bold("--use-yarn")}
128+
${chalk.bold("--use-yarn")}
129+
130+
By default, patch-package checks whether you use npm or yarn based on
131+
which lockfile you have. If you have both, it uses npm by default.
132+
Set this option to override that default and always use yarn.
107133
108-
By default, patch-package checks whether you use npm or yarn based on
109-
which lockfile you have. If you have both, it uses npm by default.
110-
Set this option to override that default and always use yarn.
134+
${chalk.bold("--exclude <regexp>")}
111135
112-
${chalk.bold("--exclude <regexp>")}
136+
Ignore paths matching the regexp when creating patch files.
137+
Paths are relative to the root dir of the package to be patched.
113138
114-
Ignore paths matching the regexp when creating patch files.
115-
Paths are relative to the root dir of the package to be patched.
139+
Default: 'package\\.json$'
116140
117-
Default: 'package\\.json$'
141+
${chalk.bold("--include <regexp>")}
118142
119-
${chalk.bold("--include <regexp>")}
143+
Only consider paths matching the regexp when creating patch files.
144+
Paths are relative to the root dir of the package to be patched.
120145
121-
Only consider paths matching the regexp when creating patch files.
122-
Paths are relative to the root dir of the package to be patched.
146+
Default '.*'
123147
124-
Default '.*'
148+
${chalk.bold("--case-sensitive-path-filtering")}
125149
126-
${chalk.bold("--case-sensitive-path-filtering")}
150+
Make regexps used in --include or --exclude filters case-sensitive.
151+
152+
${chalk.bold("--patch-dir")}
127153
128-
Make regexps used in --include or --exclude filters case-sensitive.
154+
Specify the name for the directory in which to put the patch files.
129155
`)
130156
}

0 commit comments

Comments
 (0)