bob-the-bundler
Version:
Bob The Bundler!
18 lines (17 loc) • 665 B
JavaScript
import { createConsola } from 'consola';
import yargs from 'yargs';
import { hideBin } from 'yargs/helpers';
import { bootstrapCommand } from './commands/bootstrap.js';
import { buildCommand } from './commands/build.js';
import { checkCommand } from './commands/check.js';
async function main() {
const root = yargs(hideBin(process.argv)).scriptName('bob').detectLocale(false).version();
const commands = [buildCommand, bootstrapCommand, checkCommand];
const reporter = createConsola({});
commands
.reduce((cli, cmd) => cli.command(cmd({ reporter })), root)
.help()
.showHelpOnFail(false).argv;
}
main();