custom-version
This file
Path
examples/custom-version
18 lines · 598 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 f47bdf5 point at it.
Tidy up example now check for required command arguments (#1320)John Geebefore adoptionf47bdf5
lines 1–11why, one step back1#!/usr/bin/env node23// This example shows changing the flags and description for the version option.45// const { Command } = require('commander'); // (normal include)6const { Command } = require('../'); // include commander in git clone of commander repo7const program = new Command();89program10 .version('0.0.1', '-v, --VERSION', 'new version message')11 .option('-s, --sessions', 'add session support')Tidy up some old examples (#1604)John Geebefore adoptionc1472bc
line 12why, one step back12 .option('-t, --template <engine>', 'specify template engine', 'jade');Tidy up example now check for required command arguments (#1320)John Geebefore adoptionf47bdf5
lines 13–14why, one step back1314program.parse(process.argv);Tidy up some old examples (#1604)John Geebefore adoptionc1472bc
lines 15–16why, one step back1516// Try the following:Make examples more consistent with "Try the following" (#1629)John Geebefore adoption2cc3a36
lines 17–18why, one step back17// node custom-version -v18// node custom-version --VERSION