Skip to content

Commit e6943c4

Browse files
wangweixuanabetomo
authored andcommitted
Update Chinese docs
1 parent 6f51e4a commit e6943c4

File tree

5 files changed

+265
-129
lines changed

5 files changed

+265
-129
lines changed

Readme.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ By default options on the command line are not positional, and can be specified
113113
### Common option types, boolean and value
114114

115115
The two most used option types are a boolean option, and an option which takes its value
116-
from the following argument (declared with angle brackets like `--expect <value>`). Both are `undefined` unless specified on command line.
116+
from the following argument (declared with angle brackets like `--expect <value>`). Both are `undefined` unless specified on command line.
117117

118118
Example file: [options-common.js](./examples/options-common.js)
119119

@@ -426,7 +426,7 @@ program
426426
.addCommand(build.makeBuildCommand());
427427
```
428428
429-
Configuration options can be passed with the call to `.command()` and `.addCommand()`. Specifying `hidden: true` will
429+
Configuration options can be passed with the call to `.command()` and `.addCommand()`. Specifying `hidden: true` will
430430
remove the command from the generated help output. Specifying `isDefault: true` will run the subcommand if no other
431431
subcommand is specified ([example](./examples/defaultCommand.js)).
432432
@@ -436,7 +436,7 @@ For subcommands, you can specify the argument syntax in the call to `.command()`
436436
is the only method usable for subcommands implemented using a stand-alone executable, but for other subcommands
437437
you can instead use the following method.
438438
439-
To configure a command, you can use `.argument()` to specify each expected command-argument.
439+
To configure a command, you can use `.argument()` to specify each expected command-argument.
440440
You supply the argument name and an optional description. The argument may be `<required>` or `[optional]`.
441441
You can specify a default value for an optional command-argument.
442442
@@ -513,7 +513,7 @@ program
513513
### Action handler
514514
515515
The action handler gets passed a parameter for each command-argument you declared, and two additional parameters
516-
which are the parsed options and the command object itself.
516+
which are the parsed options and the command object itself.
517517
518518
Example file: [thank.js](./examples/thank.js)
519519
@@ -630,7 +630,7 @@ shell spawn --help
630630
631631
### Custom help
632632
633-
You can add extra text to be displayed along with the built-in help.
633+
You can add extra text to be displayed along with the built-in help.
634634
635635
Example file: [custom-help](./examples/custom-help)
636636
@@ -664,7 +664,7 @@ The positions in order displayed are:
664664
- `after`: display extra information after built-in help
665665
- `afterAll`: add to the program for a global footer (epilog)
666666
667-
The positions "beforeAll" and "afterAll" apply to the command and all its subcommands.
667+
The positions "beforeAll" and "afterAll" apply to the command and all its subcommands.
668668
669669
The second parameter can be a string, or a function returning a string. The function is passed a context object for your convenience. The properties are:
670670
@@ -673,7 +673,7 @@ The second parameter can be a string, or a function returning a string. The func
673673
674674
### Display help after errors
675675
676-
The default behaviour for usage errors is to just display a short error message.
676+
The default behaviour for usage errors is to just display a short error message.
677677
You can change the behaviour to show the full help or a custom help message after an error.
678678
679679
```js
@@ -747,7 +747,7 @@ There are methods getting the visible lists of arguments, options, and subcomman
747747
748748
Example file: [configure-help.js](./examples/configure-help.js)
749749
750-
```
750+
```js
751751
program.configureHelp({
752752
sortSubcommands: true,
753753
subcommandTerm: (cmd) => cmd.name() // Just show the name, instead of short usage.
@@ -809,7 +809,7 @@ program subcommand -b
809809
810810
By default options are recognised before and after command-arguments. To only process options that come
811811
before the command-arguments, use `.passThroughOptions()`. This lets you pass the arguments and following options through to another program
812-
without needing to use `--` to end the option processing.
812+
without needing to use `--` to end the option processing.
813813
To use pass through options in a subcommand, the program needs to enable positional options.
814814
815815
Example file: [pass-through-options.js](./examples/pass-through-options.js)
@@ -826,7 +826,7 @@ By default the option processing shows an error for an unknown option. To have a
826826
By default the argument processing does not display an error for more command-arguments than expected.
827827
To display an error for excess arguments, use`.allowExcessArguments(false)`.
828828
829-
### Legacy options as properties
829+
### Legacy options as properties
830830
831831
Before Commander 7, the option values were stored as properties on the command.
832832
This was convenient to code but the downside was possible clashes with
@@ -986,7 +986,7 @@ Examples:
986986
$ deploy exec sequential
987987
$ deploy exec async`
988988
);
989-
989+
990990
program.parse(process.argv);
991991
```
992992

0 commit comments

Comments
 (0)