-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathcustom-usages.js
34 lines (26 loc) · 889 Bytes
/
custom-usages.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
"use strict";
/*
By default when the --help and --usage messages are printed there is only one
"usage" line. This line can be changed and multiple lines can be added with the
usages() function.
*/
require ("../lib").createParser ({ once: true })
.usages ([
"custom-usages <input file> <output file>",
"custom-usages [word [word [word]]]"
])
.body ()
.help ()
.usage ()
.argv ();
/*
$ node custom-usages.js --help
Usage: custom-usages <input file> <output file>
custom-usages [word [word [word]]]
-h, --help Display this help message and exit
--usage Display a short usage message and exit
--------------------------------------------------------------------------------
$ custom-usages.js --usage
Usage: custom-usages <input file> <output file>
custom-usages [word [word [word]]]
*/