async function init(args, options) { if (args.length === 0) { cli.showHelp(1); } const nonGroupedArgs = args.filter(x => !x._); // Filter grouped args args = args.filter(x => x._); if (nonGroupedArgs.length > 0) { args.push({_: nonGroupedArgs}); } const parsedArgs = parse(args, options); const items = get(parsedArgs); await generate(items, options); }
return cli.showHelp()
(async () => { try { const mapPath = cli.input[0]; if (!mapPath) cli.showHelp(); const mapContent = JSON.parse(await fs.readFile(mapPath, 'utf-8'));