mirror of
https://github.com/thangisme/notes.git
synced 2025-11-23 13:12:25 -05:00
Initial commit
This commit is contained in:
19
node_modules/yargs/example/requires_arg.js
generated
vendored
Normal file
19
node_modules/yargs/example/requires_arg.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
var yargs = require('yargs');
|
||||
|
||||
var argv = yargs.usage('This is my awesome program', {
|
||||
'input': {
|
||||
description: 'Input file name',
|
||||
requiresArg: true,
|
||||
short: 'i',
|
||||
},
|
||||
'output': {
|
||||
description: 'Output file name',
|
||||
requiresArg: true,
|
||||
short: 'o'
|
||||
}
|
||||
}).argv;
|
||||
|
||||
yargs.showHelp();
|
||||
|
||||
console.log('\n\nInspecting options');
|
||||
console.dir(argv);
|
||||
Reference in New Issue
Block a user