custom-help
This file
Path
examples/custom-help
20 lines · 399 bytes
Last changed by
Use standard import in examples (#2168)John Geebefore adoption41b12cf
History of this fileTake it
The walk stopped after 200 commits: lines older than 6c06528 point at it.
Add getOptionValue and setOptionValue (#1521)John Geebefore adoption6c06528
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 getOptionValue and setOptionValue (#1521)John Geebefore adoption6c06528
lines 7–19why, one step back7const program = new Command();89program10 .option('-f, --foo', 'enable some foo');1112program.addHelpText('after', `1314Example call:15 $ custom-help --help`);1617program.parse(process.argv);1819// Try the following:Make examples more consistent with "Try the following" (#1629)John Geebefore adoption2cc3a36
line 20why, one step back20// node custom-help --help