Skip to content

Commit

Permalink
README: Link options table to advanced options.
Browse files Browse the repository at this point in the history
  • Loading branch information
raineorshine committed Oct 4, 2023
1 parent 13eea1b commit c05c239
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ Options that take no arguments can be negated by prefixing them with `--no-`, e.
<td>Include deprecated packages.</td>
</tr>
<tr>
<td>-d, --doctor</td>
<td>-d, [--doctor](doctor)</td>
<td>Iteratively installs upgrades and runs tests to identify breaking upgrades. Requires <code>-u</code> to execute.</td>
</tr>
<tr>
Expand All @@ -227,31 +227,31 @@ Options that take no arguments can be negated by prefixing them with `--no-`, e.
<td>Set the error level. 1: exits with error code 0 if no errors occur. 2: exits with error code 0 if no packages need updating (useful for continuous integration). (default: 1)</td>
</tr>
<tr>
<td>-f, --filter <p></td>
<td>-f, [--filter](filter) <p></td>
<td>Include only package names matching the given string, wildcard, glob, comma-or-space-delimited list, /regex/, or predicate function.</td>
</tr>
<tr>
<td>filterResults <fn></td>
<td>[filterResults](filterresults) <fn></td>
<td>Filters out upgrades based on a user provided function.</td>
</tr>
<tr>
<td>--filterVersion <p></td>
<td>[--filterVersion](filterversion) <p></td>
<td>Filter on package version using comma-or-space-delimited list, /regex/, or predicate function.</td>
</tr>
<tr>
<td>--format <value></td>
<td>[--format](format) <value></td>
<td>Modify the output formatting or show additional information. Specify one or more comma-delimited values: group, ownerChanged, repo, time, lines. (default: [])</td>
</tr>
<tr>
<td>-g, --global</td>
<td>Check global packages instead of in the current project.</td>
</tr>
<tr>
<td>groupFunction <fn></td>
<td>[groupFunction](groupfunction) <fn></td>
<td>Customize how packages are divided into groups when using <code>--format group</code>.</td>
</tr>
<tr>
<td>--install <value></td>
<td>[--install](install) <value></td>
<td>Control the auto-install behavior: always, never, prompt. (default: "prompt")</td>
</tr>
<tr>
Expand Down Expand Up @@ -291,11 +291,11 @@ Options that take no arguments can be negated by prefixing them with `--no-`, e.
<td>Package file(s) location. (default: ./package.json)</td>
</tr>
<tr>
<td>-p, --packageManager <s></td>
<td>-p, [--packageManager](packagemanager) <s></td>
<td>npm, yarn, pnpm, deno, bun, staticRegistry (default: npm).</td>
</tr>
<tr>
<td>--peer</td>
<td>[--peer](peer)</td>
<td>Check peer dependencies of installed packages and filter updates to compatible versions.</td>
</tr>
<tr>
Expand All @@ -311,15 +311,15 @@ Options that take no arguments can be negated by prefixing them with `--no-`, e.
<td>Specify the registry to use when looking up package versions.</td>
</tr>
<tr>
<td>--registryType <type></td>
<td>[--registryType](registrytype) <type></td>
<td>Specify whether --registry refers to a full npm registry or a simple JSON file or url: npm, json. (default: npm)</td>
</tr>
<tr>
<td>-x, --reject <p></td>
<td>-x, [--reject](reject) <p></td>
<td>Exclude packages matching the given string, wildcard, glob, comma-or-space-delimited list, /regex/, or predicate function.</td>
</tr>
<tr>
<td>--rejectVersion <p></td>
<td>[--rejectVersion](rejectversion) <p></td>
<td>Exclude package.json versions using comma-or-space-delimited list, /regex/, or predicate function.</td>
</tr>
<tr>
Expand All @@ -343,7 +343,7 @@ Options that take no arguments can be negated by prefixing them with `--no-`, e.
<td>Read package.json from stdin.</td>
</tr>
<tr>
<td>-t, --target <value></td>
<td>-t, [--target](target) <value></td>
<td>Determines the version to upgrade to: latest, newest, greatest, minor, patch, semver, @[tag], or [function]. (default: latest)</td>
</tr>
<tr>
Expand Down
6 changes: 3 additions & 3 deletions src/scripts/build-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ const injectReadme = async () => {
const optionRows = cliOptions
.map(option => {
return ` <tr>
<td>${option.short ? `-${option.short}, ` : ''}${option.cli !== false ? '--' : ''}${option.long}${
option.arg ? ` <${option.arg}>` : ''
}</td>
<td>${option.short ? `-${option.short}, ` : ''}${option.help ? `<a href="#${option.long.toLowerCase()}">` : ''}${
option.cli !== false ? '--' : ''
}${option.long}${option.help ? '</a>' : ''}${option.arg ? ` <${option.arg}>` : ''}</td>
<td>${codeHtml(option.description)}${option.default ? ` (default: ${JSON.stringify(option.default)})` : ''}</td>
</tr>`
})
Expand Down

0 comments on commit c05c239

Please sign in to comment.