[READ-ONLY] Mirror of https://github.com/bombshell-dev/tools. Internal CLI to standardize tooling across all Bombshell projects
Something went wrong. Try again.
TypeScript
12345678910111213141516171819202122232425262728293031323334#!/usr/bin/env nodeimport { argv } from 'node:process';import { build } from './commands/build.ts';import { dev } from './commands/dev.ts';import { format } from './commands/format.ts';import { init } from './commands/init.ts';import { lint } from './commands/lint.ts';import { publintCommand as publint } from './commands/publint.ts';import { sync } from './commands/sync.ts';import { test } from './commands/test.ts';
const commands = { build, dev, format, init, lint, publint, sync, test };
async function main() { const [command, ...args] = argv.slice(2);
if (!command) { console.info(`No command provided. Available commands: ${Object.keys(commands).join(', ')}\n`); return; }
const run = commands[command as keyof typeof commands]; if (!run) { console.info( `Unknown command: ${command}. Available commands: ${Object.keys(commands).join(', ')}`, ); return; }
await run({ args });}
main();