usage-options.js 440 B

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