Skip to content

Commit

Permalink
README: minor
Browse files Browse the repository at this point in the history
  • Loading branch information
raineorshine committed Oct 4, 2023
1 parent 4e4298c commit 85063da
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ Options that take no arguments can be negated by prefixing them with `--no-`, e.
</tr>
<tr>
<td>--doctorInstall &lt;command&gt;</td>
<td>Specifies the install script to use in doctor mode. (default: <code>npm install/yarn</code>)</td>
<td>Specifies the install script to use in doctor mode. (default: <code>npm install</code> or the equivalent for your package manager)</td>
</tr>
<tr>
<td>--doctorTest &lt;command&gt;</td>
Expand Down Expand Up @@ -640,7 +640,7 @@ Usage:
ncu --registryType [type]
Specify whether --registry refers to a full npm registry or a simple JSON file.
Specify whether `--registry` refers to a full npm registry or a simple JSON file.
<table>
<tr><td>npm</td><td>Default npm registry</td></tr>
Expand Down
8 changes: 6 additions & 2 deletions src/cli-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,10 @@ const extendedHelpPackageManager: ExtendedHelp = ({ markdown }) => {

/** Extended help for the --registryType option. */
const extendedHelpRegistryType: ExtendedHelp = ({ markdown }) => {
const header = 'Specify whether --registry refers to a full npm registry or a simple JSON file.'
/** If markdown, surround inline code with backticks. */
const codeInline = (code: string) => (markdown ? `\`${code}\`` : code)

const header = `Specify whether ${codeInline('--registry')} refers to a full npm registry or a simple JSON file.`
const tableString = table({
colAligns: ['right', 'left'],
markdown,
Expand Down Expand Up @@ -586,7 +589,8 @@ const cliOptions: CLIOption[] = [
{
long: 'doctorInstall',
arg: 'command',
description: 'Specifies the install script to use in doctor mode. (default: `npm install/yarn`)',
description:
'Specifies the install script to use in doctor mode. (default: `npm install` or the equivalent for your package manager)',
type: 'string',
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/types/RunOptions.json
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@
"type": "boolean"
},
"doctorInstall": {
"description": "Specifies the install script to use in doctor mode. (default: `npm install/yarn`)",
"description": "Specifies the install script to use in doctor mode. (default: `npm install` or the equivalent for your package manager)",
"type": "string"
},
"doctorTest": {
Expand Down
2 changes: 1 addition & 1 deletion src/types/RunOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export interface RunOptions {
/** Iteratively installs upgrades and runs tests to identify breaking upgrades. Requires `-u` to execute. Run "ncu --help --doctor" for details. */
doctor?: boolean

/** Specifies the install script to use in doctor mode. (default: `npm install/yarn`) */
/** Specifies the install script to use in doctor mode. (default: `npm install` or the equivalent for your package manager) */
doctorInstall?: string

/** Specifies the test script to use in doctor mode. (default: `npm test`) */
Expand Down

0 comments on commit 85063da

Please sign in to comment.