mirror of
https://github.com/thangisme/notes.git
synced 2025-09-25 04:14:10 -04:00
Initial commit
This commit is contained in:
27
node_modules/yargs/example/help.js
generated
vendored
Normal file
27
node_modules/yargs/example/help.js
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
var yargs = require('../index');
|
||||
|
||||
var argv = yargs
|
||||
.usage('This is my awesome program\n\nUsage: $0 [options]')
|
||||
.help('help').alias('help', 'h')
|
||||
.version('1.0.1', 'version').alias('version', 'V')
|
||||
.options({
|
||||
input: {
|
||||
alias: 'i',
|
||||
description: "<filename> Input file name",
|
||||
requiresArg: true,
|
||||
required: true
|
||||
},
|
||||
output: {
|
||||
alias: 'o',
|
||||
description: "<filename> output file name",
|
||||
requiresArg: true,
|
||||
required: true
|
||||
}
|
||||
})
|
||||
.argv;
|
||||
|
||||
console.log('Inspecting options');
|
||||
console.dir(argv);
|
||||
|
||||
console.log("input:", argv.input);
|
||||
console.log("output:", argv.output);
|
Reference in New Issue
Block a user