Skip to content
Myr

Deprecate command:* command and event (#1612)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by John Gee · committed by GitHub · parent c1472bc · Browse files · 3 files+45 added−18 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+45 added−18 removed

  • other:+45 added−18 removed

3 files+45 added−18 removed

modified:docs/deprecated.md+45 added-4 removed
modified:Readme_zh-CN.md-7 removed
729 unmodified lines
730```js731program.on('option:verbose', function () {732 process.env.VERBOSE = this.opts().verbose;733});734735program.on('command:*', function (operands) {736 console.error(`error: unknown command '${operands[0]}'`);737 const availableCommands = program.commands.map(cmd => cmd.name());738 mySuggestBestMatch(operands[0], availableCommands);739 process.exitCode = 1;740});734```735736## 零碎知识737
221 unmodified lines
modified:Readme.md-7 removed
776 unmodified lines
777```js778program.on('option:verbose', function () {779 process.env.VERBOSE = this.opts().verbose;780});781782program.on('command:*', function (operands) {783 console.error(`error: unknown command '${operands[0]}'`);784 const availableCommands = program.commands.map(cmd => cmd.name());785 mySuggestBestMatch(operands[0], availableCommands);786 process.exitCode = 1;787});781```782783## Bits and pieces784
230 unmodified lines