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); }
const spacing = amount => (cli.flags.singleLine ? '' : ' '.repeat(amount))
const lineBreak = amount => (cli.flags.singleLine ? '' : '\n'.repeat(amount))