strict.js 423 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. boolean: true,
  6. short: 'a',
  7. },
  8. 'info': {
  9. description: 'Provide some information about this program',
  10. boolean: true,
  11. short: 'i'
  12. }
  13. }).strict().argv;
  14. yargs.showHelp();
  15. console.log('\n\nInspecting options');
  16. console.dir(argv);