custom-help
This file
Path
examples/custom-help
21 lines · 510 bytes
Last changed by
Make examples more consistent with "Try the following" (#1629)John Geebefore adoption2cc3a36
History of this fileTake it
The walk stopped after 200 commits: lines older than bdad7dc point at it.
update Readme_zh-CN.md for v5.0oGsLPbefore adoptionbdad7dc
lines 1–2why, one step back1#!/usr/bin/env node2Expand help customisation with .addHelpText (#1296)John Geebefore adoptiond26a26d
lines 3–4why, one step back3// This example shows a simple use of addHelpText.4// This is used as an example in the README.Merge pull request #1305 from tj/release/6.xTomoaki Abebefore adoptionc5a5e7b
lines 5–8why, one step back56// const { Command } = require('commander'); // (normal include)7const { Command } = require('../'); // include commander in git clone of commander repo8const program = new Command();update Readme_zh-CN.md for v5.0oGsLPbefore adoptionbdad7dc
lines 9–12why, one step back910program11 .option('-f, --foo', 'enable some foo');12Expand help customisation with .addHelpText (#1296)John Geebefore adoptiond26a26d
line 13why, one step back13program.addHelpText('after', `update Readme_zh-CN.md for v5.0oGsLPbefore adoptionbdad7dc
line 14why, one step back14Expand help customisation with .addHelpText (#1296)John Geebefore adoptiond26a26d
lines 15–17why, one step back15Example call:16 $ custom-help --help`);17update Readme_zh-CN.md for v5.0oGsLPbefore adoptionbdad7dc
line 18why, one step back18program.parse(process.argv);Expand help customisation with .addHelpText (#1296)John Geebefore adoptiond26a26d
lines 19–20why, one step back1920// Try the following:Make examples more consistent with "Try the following" (#1629)John Geebefore adoption2cc3a36
line 21why, one step back21// node custom-help --help