bob-the-bundler
Version:
Bob The Bundler!
24 lines (23 loc) • 764 B
JavaScript
import consola 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';
import { runifyCommand } from './commands/runify.js';
async function main() {
const root = yargs(hideBin(process.argv)).scriptName('bob').detectLocale(false).version();
const commands = [
buildCommand,
runifyCommand,
bootstrapCommand,
checkCommand,
];
const reporter = consola.create({});
commands
.reduce((cli, cmd) => cli.command(cmd({ reporter })), root)
.help()
.showHelpOnFail(false).argv;
}
main();