diff --git a/examples/action-this.js b/examples/action-this.js index 1ff286c4e..9229ce3b1 100644 --- a/examples/action-this.js +++ b/examples/action-this.js @@ -2,8 +2,7 @@ // This example is used as an example in the README for the action handler. -// const { Command } = require('commander'); // (normal include) -const { Command } = require('../'); // include commander in git clone of commander repo +const { Command } = require('commander'); const program = new Command(); program diff --git a/examples/alias.js b/examples/alias.js index ca9a9cd6d..0e3a87bca 100644 --- a/examples/alias.js +++ b/examples/alias.js @@ -2,8 +2,7 @@ // This example shows giving alternative names for a command. -// const { Command } = require('commander'); // (normal include) -const { Command } = require('../'); // include commander in git clone of commander repo +const { Command } = require('commander'); const program = new Command(); program diff --git a/examples/argument.js b/examples/argument.js index cddc2e814..cf1716207 100644 --- a/examples/argument.js +++ b/examples/argument.js @@ -2,8 +2,7 @@ // This example shows specifying the command arguments using argument() function. -// const { Command } = require('commander'); // (normal include) -const { Command } = require('../'); // include commander in git clone of commander repo +const { Command } = require('commander'); const program = new Command(); program diff --git a/examples/arguments-custom-processing.js b/examples/arguments-custom-processing.js index ac92855f6..0001b3259 100644 --- a/examples/arguments-custom-processing.js +++ b/examples/arguments-custom-processing.js @@ -4,8 +4,7 @@ // Custom argument processing // You may specify a function to do custom processing of argument values. -// const commander = require('commander'); // (normal include) -const commander = require('../'); // include commander in git clone of commander repo +const commander = require('commander'); const program = new commander.Command(); function myParseInt(value, dummyPrevious) { diff --git a/examples/arguments-extra.js b/examples/arguments-extra.js index d19163e8f..4fc07850e 100644 --- a/examples/arguments-extra.js +++ b/examples/arguments-extra.js @@ -2,8 +2,7 @@ // This is used as an example in the README for extra argument features. -// const commander = require('commander'); // (normal include) -const commander = require('../'); // include commander in git clone of commander repo +const commander = require('commander'); const program = new commander.Command(); program diff --git a/examples/configure-help.js b/examples/configure-help.js index 09b827d46..9b2f13c43 100644 --- a/examples/configure-help.js +++ b/examples/configure-help.js @@ -1,6 +1,4 @@ -// const commander = require('commander'); // (normal include) -const commander = require('../'); // include commander in git clone of commander repo - +const commander = require('commander'); const program = new commander.Command(); // This example shows a simple use of configureHelp. diff --git a/examples/configure-output.js b/examples/configure-output.js index b18d8bee2..9f94dadaa 100644 --- a/examples/configure-output.js +++ b/examples/configure-output.js @@ -1,6 +1,4 @@ -// const commander = require('commander'); // (normal include) -const commander = require('../'); // include commander in git clone of commander repo - +const commander = require('commander'); const program = new commander.Command(); function errorColor(str) { diff --git a/examples/custom-command-class.js b/examples/custom-command-class.js index a5e40b00b..61d5b1b0a 100755 --- a/examples/custom-command-class.js +++ b/examples/custom-command-class.js @@ -1,7 +1,5 @@ #!/usr/bin/env node - -// const commander = require('commander'); // (normal include) -const commander = require('../'); // include commander in git clone of commander repo +const commander = require('commander'); // Use a class override to customise the command and its subcommands. diff --git a/examples/custom-help b/examples/custom-help index 30bce048f..4e2a1dfc2 100755 --- a/examples/custom-help +++ b/examples/custom-help @@ -3,8 +3,7 @@ // This example shows a simple use of addHelpText. // This is used as an example in the README. -// const { Command } = require('commander'); // (normal include) -const { Command } = require('../'); // include commander in git clone of commander repo +const { Command } = require('commander'); const program = new Command(); program diff --git a/examples/custom-help-description b/examples/custom-help-description index 85614df1b..ccabc7b87 100755 --- a/examples/custom-help-description +++ b/examples/custom-help-description @@ -2,8 +2,7 @@ // This example shows changing the flags and description for the help option. -// const { Command } = require('commander'); // (normal include) -const { Command } = require('../'); // include commander in git clone of commander repo +const { Command } = require('commander'); const program = new Command(); program diff --git a/examples/custom-help-text.js b/examples/custom-help-text.js index ce79330ba..52a09bac7 100644 --- a/examples/custom-help-text.js +++ b/examples/custom-help-text.js @@ -2,8 +2,7 @@ // This example shows using addHelpText. -// const { Command } = require('commander'); // (normal include) -const { Command } = require('../'); // include commander in git clone of commander repo +const { Command } = require('commander'); const program = new Command(); program.name('awesome'); diff --git a/examples/custom-version b/examples/custom-version index 2f2ba5431..7649d9777 100755 --- a/examples/custom-version +++ b/examples/custom-version @@ -2,8 +2,7 @@ // This example shows changing the flags and description for the version option. -// const { Command } = require('commander'); // (normal include) -const { Command } = require('../'); // include commander in git clone of commander repo +const { Command } = require('commander'); const program = new Command(); program diff --git a/examples/defaultCommand.js b/examples/defaultCommand.js index c66ec6be9..b383d609c 100755 --- a/examples/defaultCommand.js +++ b/examples/defaultCommand.js @@ -1,7 +1,6 @@ #!/usr/bin/env node -// const commander = require('commander'); // (normal include) -const commander = require('../'); // include commander in git clone of commander repo +const commander = require('commander'); const program = new commander.Command(); // Example program using the command configuration option isDefault to specify the default command. diff --git a/examples/deploy b/examples/deploy index d24b4b6ab..6efae7c04 100755 --- a/examples/deploy +++ b/examples/deploy @@ -1,7 +1,6 @@ #!/usr/bin/env node -// const { Command } = require('commander'); // (normal include) -const { Command } = require('../'); // include commander in git clone of commander repo +const { Command } = require('commander'); const program = new Command(); program diff --git a/examples/description b/examples/description index 7ee8d4301..00e277c46 100755 --- a/examples/description +++ b/examples/description @@ -2,8 +2,7 @@ // This example shows adding a description which is displayed in the help. -// const { Command } = require('commander'); // (normal include) -const { Command } = require('../'); // include commander in git clone of commander repo +const { Command } = require('commander'); const program = new Command(); program diff --git a/examples/global-options-added.js b/examples/global-options-added.js index a064f9a83..5bb6f697a 100644 --- a/examples/global-options-added.js +++ b/examples/global-options-added.js @@ -9,8 +9,7 @@ // (A different pattern for a "global" option is to add it to the root command, rather // than to the subcommand. See global-options-nested.js.) -// const { Command } = require('commander'); // (normal include) -const { Command } = require('../'); // include commander in git clone of commander repo +const { Command } = require('commander'); // Common options can be added when subcommands are created by using a custom subclass. // If the options are unsorted in the help, these will appear first. diff --git a/examples/global-options-nested.js b/examples/global-options-nested.js index ec5f30fa2..91917fb14 100644 --- a/examples/global-options-nested.js +++ b/examples/global-options-nested.js @@ -6,9 +6,7 @@ // (A different pattern for a "global" option is to add it to the subcommands, rather // than to the program. See global-options-added.js.) -// const { Command } = require('commander'); // (normal include) -const { Command } = require('../'); // include commander in git clone of commander repo - +const { Command } = require('commander'); const program = new Command(); program diff --git a/examples/help-subcommands-usage.js b/examples/help-subcommands-usage.js index a2f71476f..a94eefc5d 100644 --- a/examples/help-subcommands-usage.js +++ b/examples/help-subcommands-usage.js @@ -1,5 +1,4 @@ -// const commander = require('commander'); // (normal include) -const commander = require('../'); // include commander in git clone of commander repo +const commander = require('commander'); // By default the subcommand list includes a fairly simple usage. If you have added a custom usage // to the subcommands you may wish to configure the help to show these instead. diff --git a/examples/hook.js b/examples/hook.js index 3518ee075..b85a10988 100644 --- a/examples/hook.js +++ b/examples/hook.js @@ -1,7 +1,6 @@ #!/usr/bin/env node -// const commander = require('commander'); // (normal include) -const { Command, Option } = require('../'); // include commander in git clone of commander repo +const { Command, Option } = require('commander'); const program = new Command(); // This example shows using some hooks for life cycle events. diff --git a/examples/nestedCommands.js b/examples/nestedCommands.js index 16b0a6e41..cd425d0dc 100755 --- a/examples/nestedCommands.js +++ b/examples/nestedCommands.js @@ -1,7 +1,6 @@ #!/usr/bin/env node -// const commander = require('commander'); // (normal include) -const commander = require('../'); // include commander in git clone of commander repo +const commander = require('commander'); const program = new commander.Command(); // Commander supports nested subcommands. diff --git a/examples/options-boolean-or-value.js b/examples/options-boolean-or-value.js index af27678a5..0e03b90d3 100755 --- a/examples/options-boolean-or-value.js +++ b/examples/options-boolean-or-value.js @@ -4,8 +4,7 @@ // Other option types, flag|value // You can specify an option which functions as a flag but may also take a value (declared using square brackets). -// const commander = require('commander'); // (normal include) -const commander = require('../'); // include commander in git clone of commander repo +const commander = require('commander'); const program = new commander.Command(); program diff --git a/examples/options-common.js b/examples/options-common.js index 58202d55c..ed1acba28 100755 --- a/examples/options-common.js +++ b/examples/options-common.js @@ -3,8 +3,7 @@ // This is used as an example in the README for: // Common option types, boolean and value -// const commander = require('commander'); // (normal include) -const commander = require('../'); // include commander in git clone of commander repo +const commander = require('commander'); const program = new commander.Command(); program diff --git a/examples/options-conflicts.js b/examples/options-conflicts.js index 73d1e1c05..163620e66 100644 --- a/examples/options-conflicts.js +++ b/examples/options-conflicts.js @@ -1,6 +1,5 @@ #!/usr/bin/env node -// const { Command, Option } = require('commander'); // (normal include) -const { Command, Option } = require('../'); // include commander in git clone of commander repo +const { Command, Option } = require('commander'); const program = new Command(); // You can use .conflicts() with a single string, which is the camel-case name of the conflicting option. diff --git a/examples/options-custom-processing.js b/examples/options-custom-processing.js index 1325fee3b..caea392d9 100755 --- a/examples/options-custom-processing.js +++ b/examples/options-custom-processing.js @@ -4,8 +4,7 @@ // Custom option processing // You may specify a function to do custom processing of option values. -// const commander = require('commander'); // (normal include) -const commander = require('../'); // include commander in git clone of commander repo +const commander = require('commander'); const program = new commander.Command(); function myParseInt(value, dummyPrevious) { diff --git a/examples/options-defaults.js b/examples/options-defaults.js index d7738b5b1..03de697cd 100755 --- a/examples/options-defaults.js +++ b/examples/options-defaults.js @@ -3,8 +3,7 @@ // This is used as an example in the README for: // Default option value -// const commander = require('commander'); // (normal include) -const commander = require('../'); // include commander in git clone of commander repo +const commander = require('commander'); const program = new commander.Command(); program diff --git a/examples/options-env.js b/examples/options-env.js index fe1b0e029..e4854b72a 100644 --- a/examples/options-env.js +++ b/examples/options-env.js @@ -1,6 +1,5 @@ #!/usr/bin/env node -// const { Command, Option } = require('commander'); // (normal include) -const { Command, Option } = require('../'); // include commander in git clone of commander repo +const { Command, Option } = require('commander'); const program = new Command(); program.addOption(new Option('-p, --port ', 'specify port number') diff --git a/examples/options-extra.js b/examples/options-extra.js index 1ce1b11ca..96affc34a 100644 --- a/examples/options-extra.js +++ b/examples/options-extra.js @@ -4,8 +4,7 @@ // See also options-env.js for more extensive env examples, // and options-conflicts.js for more details about .conflicts(). -// const { Command, Option } = require('commander'); // (normal include) -const { Command, Option } = require('../'); // include commander in git clone of commander repo +const { Command, Option } = require('commander'); const program = new Command(); program diff --git a/examples/options-implies.js b/examples/options-implies.js index 1633ff1cf..3474ae066 100644 --- a/examples/options-implies.js +++ b/examples/options-implies.js @@ -1,6 +1,5 @@ #!/usr/bin/env node -// const { Command, Option } = require('commander'); // (normal include) -const { Command, Option } = require('../'); // include commander in git clone of commander repo +const { Command, Option } = require('commander'); const program = new Command(); program diff --git a/examples/options-negatable.js b/examples/options-negatable.js index 2d517dec7..ecec6dbe0 100755 --- a/examples/options-negatable.js +++ b/examples/options-negatable.js @@ -4,8 +4,7 @@ // Other option types, negatable boolean // You can specify a boolean option long name with a leading `no-` to make it true by default and able to be negated. -// const commander = require('commander'); // (normal include) -const commander = require('../'); // include commander in git clone of commander repo +const commander = require('commander'); const program = new commander.Command(); program diff --git a/examples/options-required.js b/examples/options-required.js index 9a94173fe..a563d1931 100755 --- a/examples/options-required.js +++ b/examples/options-required.js @@ -5,8 +5,7 @@ // You may specify a required (mandatory) option using `.requiredOption`. // The option must be specified on the command line, or by having a default value. -// const commander = require('commander'); // (normal include) -const commander = require('../'); // include commander in git clone of commander repo +const commander = require('commander'); const program = new commander.Command(); program diff --git a/examples/options-variadic.js b/examples/options-variadic.js index db78646b1..f3a630141 100644 --- a/examples/options-variadic.js +++ b/examples/options-variadic.js @@ -2,8 +2,7 @@ // This is used as an example in the README for variadic options. -// const commander = require('commander'); // (normal include) -const commander = require('../'); // include commander in git clone of commander repo +const commander = require('commander'); const program = new commander.Command(); program diff --git a/examples/pass-through-options.js b/examples/pass-through-options.js index 5e33b9c9e..b5cba294f 100644 --- a/examples/pass-through-options.js +++ b/examples/pass-through-options.js @@ -1,7 +1,6 @@ #!/usr/bin/env node -// const { Command } = require('commander'); // (normal include) -const { Command } = require('../'); // include commander in git clone of commander repo +const { Command } = require('commander'); const program = new Command(); program diff --git a/examples/pizza b/examples/pizza index 45fe4f5d2..f7c0ead27 100755 --- a/examples/pizza +++ b/examples/pizza @@ -1,7 +1,6 @@ #!/usr/bin/env node -// const { Command } = require('commander'); // (normal include) -const { Command } = require('../'); // include commander in git clone of commander repo +const { Command } = require('commander'); const program = new Command(); program diff --git a/examples/pm b/examples/pm index 56964e183..3cb21c271 100755 --- a/examples/pm +++ b/examples/pm @@ -1,7 +1,6 @@ #!/usr/bin/env node -// const { Command } = require('commander'); // (normal include) -const { Command } = require('../'); // include commander in git clone of commander repo +const { Command } = require('commander'); const program = new Command(); // Example of subcommands which are implemented as stand-alone executable files. diff --git a/examples/pm-install b/examples/pm-install index 2648bd61c..7990eeefd 100755 --- a/examples/pm-install +++ b/examples/pm-install @@ -1,7 +1,6 @@ #!/usr/bin/env node -// const { Command } = require('commander'); // (normal include) -const { Command } = require('../'); // include commander in git clone of commander repo +const { Command } = require('commander'); const program = new Command(); program diff --git a/examples/positional-options.js b/examples/positional-options.js index 383f11432..4b864934d 100644 --- a/examples/positional-options.js +++ b/examples/positional-options.js @@ -1,7 +1,6 @@ #!/usr/bin/env node -// const { Command } = require('commander'); // (normal include) -const { Command } = require('../'); // include commander in git clone of commander repo +const { Command } = require('commander'); const program = new Command(); program diff --git a/examples/split.js b/examples/split.js index 0dd68ebc2..f14d89f34 100644 --- a/examples/split.js +++ b/examples/split.js @@ -1,5 +1,4 @@ -// const { program } = require('commander'); // (normal include) -const { program } = require('../'); // include commander in git clone of commander repo +const { program } = require('commander'); // This is used as an example in the README for the Quick Start. diff --git a/examples/string-util.js b/examples/string-util.js index 9b8ac7178..98e005043 100644 --- a/examples/string-util.js +++ b/examples/string-util.js @@ -1,5 +1,4 @@ -// const { Command } = require('commander'); // (normal include) -const { Command } = require('../'); // include commander in git clone of commander repo +const { Command } = require('commander'); const program = new Command(); // This is used as an example in the README for the Quick Start. diff --git a/examples/thank.js b/examples/thank.js index b53049ac8..7386e5642 100644 --- a/examples/thank.js +++ b/examples/thank.js @@ -2,8 +2,7 @@ // This example is used as an example in the README for the action handler. -// const { Command } = require('commander'); // (normal include) -const { Command } = require('../'); // include commander in git clone of commander repo +const { Command } = require('commander'); const program = new Command(); program