Skip to content
Myr

custom-help

This file

Path

examples/custom-help

28 lines · 534 bytes

Last changed by

Examples: use "require" that works from git repo, and lint. (#1072)John Geebefore adoption57e9d98

History of this file

Take it

The walk stopped after 200 commits: lines older than c6c8472 point at it.

Merge pull request #398 from zhiyelee/backoutZhiye Libefore adoptionc6c8472

lines 1–17why, one step back
1#!/usr/bin/env node
23/**4 * Module dependencies.5 */67var program = require('../');89program10 .version('0.0.1')11 .option('-f, --foo', 'enable some foo')12 .option('-b, --bar', 'enable some bar')13 .option('-B, --baz', 'enable some baz');1415// must be before .parse() since16// node's emit() is immediate17

Examples: use "require" that works from git repo, and lint. (#1072)John Geebefore adoption57e9d98

line 18why, one step back
18program.on('--help', function() {

Merge pull request #398 from zhiyelee/backoutZhiye Libefore adoptionc6c8472

line 19why, one step back
19 console.log('');

Standardize help output (#853)Jared Petersenbefore adoption713db77

line 20why, one step back
20 console.log('Examples:');

Merge pull request #398 from zhiyelee/backoutZhiye Libefore adoptionc6c8472

line 21why, one step back
21 console.log('');

Standardize help output (#853)Jared Petersenbefore adoption713db77

lines 22–23why, one step back
22 console.log(' $ custom-help --help');
23 console.log(' $ custom-help -h');

Merge pull request #398 from zhiyelee/backoutZhiye Libefore adoptionc6c8472

lines 24–28why, one step back
24});
2526program.parse(process.argv);2728program.help();