custom-help
This file
Path
examples/custom-help
22 lines · 403 bytes
Last changed by
Reformat code with Prettier (#2180)John Geebefore adoption1bdc749
History of this fileTake it
The walk stopped after 200 commits: lines older than 3103c6b point at it.
Add more tests for implies (#1730)John Geebefore adoption3103c6b
lines 1–5why, one step back1#!/usr/bin/env node23// This example shows a simple use of addHelpText.4// This is used as an example in the README.5Use standard import in examples (#2168)John Geebefore adoption41b12cf
line 6why, one step back6const { Command } = require('commander');Add more tests for implies (#1730)John Geebefore adoption3103c6b
lines 7–8why, one step back7const program = new Command();8Reformat code with Prettier (#2180)John Geebefore adoption1bdc749
line 9why, one step back9program.option('-f, --foo', 'enable some foo');Add more tests for implies (#1730)John Geebefore adoption3103c6b
line 10why, one step back10Reformat code with Prettier (#2180)John Geebefore adoption1bdc749
lines 11–13why, one step back11program.addHelpText(12 'after',13 `Add more tests for implies (#1730)John Geebefore adoption3103c6b
lines 14–15why, one step back1415Example call:Reformat code with Prettier (#2180)John Geebefore adoption1bdc749
lines 16–17why, one step back16 $ custom-help --help`,17);Add more tests for implies (#1730)John Geebefore adoption3103c6b
lines 18–22why, one step back1819program.parse(process.argv);2021// Try the following:22// node custom-help --help