// more help.example('...').epilog('copyright 2015').command('start','start a server')
Options
.option('f',{alias:'file',describe:'x marks the spot',type:'string',/* array | boolean | string */nargs:1,demand:true,demand:'file is required',default:'/etc/passwd'// also: count:true, requiresArg:true}).options({f:{...}})
Help and version
varargv=require('yargs')// version.alias('v','version').version(function(){returnrequire('../package').version;}).describe('v','show version information')// help text.alias('h','help').help('help').usage('Usage: $0 -x [num]').showHelpOnFail(false,"Specify --help for available options")
Top comments (0)