deno.land / x / yargs@v17.6.0-deno / example / requires_arg.js
123456789101112131415161718192021#!/usr/bin/env nodevar yargs = require('yargs/yargs')(process.argv.slice(2));
var argv = yargs.usage('This is my awesome program').options({ input: { description: 'Input file name', requiresArg: true, alias: 'i', }, output: { description: 'Output file name', requiresArg: true, alias: 'o', },}).argv;
yargs.showHelp();
console.log('\n\nInspecting options');console.dir(argv);
Version Info