Skip to content

easimonenko/node-cli-options-parsing-review

Repository files navigation

node-cli-options-parsing-review

Review of modules for parsing command line options in Node.js.

For generating of table or for trying of samples install packages first:

npm install

or

yarn install

Generating of Table

To generating of table in HTML use the command:

cd table
node table.js > table.html

To generating of table in Markdown format add option --markdown or -m:

cd table
node table.js --markdown > table.md

Sample for commander

Try:

cd samples
node commander.js --help

Sample for minimist

Try:

cd samples
node mininist.js -abc --help --size=large -- 1 2 3
node mininist-with-settings.js -abc --help --size=large -- 1 2 3

Sample for yargs

Try:

cd samples
node yargs.js --version
node yargs.js -h
node yargs.js --size=middle
node yargs.js --list 1 2 3 --size=large

(c) 2016, 2019 Evgeny Simonenko easimonenko@gmail.com