usage-options.js 427 B

12345678910111213141516171819
  1. var yargs = require('yargs');
  2. var argv = yargs.usage('This is my awesome program', {
  3. 'about': {
  4. description: 'Provide some details about the author of this program',
  5. required: true,
  6. alias: 'a',
  7. },
  8. 'info': {
  9. description: 'Provide some information about the node.js agains!!!!!!',
  10. boolean: true,
  11. alias: 'i'
  12. }
  13. }).argv;
  14. yargs.showHelp();
  15. console.log('\n\nInspecting options');
  16. console.dir(argv);