Skip to content
Myr

description

This file

Path

examples/description

23 lines · 563 bytes

Last changed by

Use standard import in examples (#2168)John Geebefore adoption41b12cf

History of this file

Take 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–4why, one step back
1#!/usr/bin/env node
23// This example shows adding a description which is displayed in the help.4

Use standard import in examples (#2168)John Geebefore adoption41b12cf

line 5why, one step back
5const { Command } = require('commander');

Add more tests for implies (#1730)John Geebefore adoption3103c6b

lines 6–23why, one step back
6const program = new Command();
78program9 .version('0.0.1')10 .description('Application simple description')11 .option('-f, --foo', 'enable some foo')12 .option('-b, --bar', 'enable some bar')13 .option('-B, --baz', 'enable some baz');1415program.parse(process.argv);1617if (!program.args.length) program.help();1819// Try the following on macOS or Linux:20// ./description -h21//22// Try the following:23// node description -h