@bomb.sh/tools
Version:
The internal dev, build, and lint CLI for Bombshell projects
1 lines • 1.5 kB
Source Map (JSON)
{"version":3,"file":"bin.mjs","names":[],"sources":["../src/bin.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { argv } from 'node:process';\nimport { build } from './commands/build.ts';\nimport { dev } from './commands/dev.ts';\nimport { format } from './commands/format.ts';\nimport { init } from './commands/init.ts';\nimport { lint } from './commands/lint.ts';\nimport { publintCommand as publint } from './commands/publint.ts';\nimport { sync } from './commands/sync.ts';\nimport { test } from './commands/test.ts';\n\nconst commands = { build, dev, format, init, lint, publint, sync, test };\n\nasync function main() {\n\tconst [command, ...args] = argv.slice(2);\n\n\tif (!command) {\n\t\tconsole.info(`No command provided. Available commands: ${Object.keys(commands).join(', ')}\\n`);\n\t\treturn;\n\t}\n\n\tconst run = commands[command as keyof typeof commands];\n\tif (!run) {\n\t\tconsole.info(\n\t\t\t`Unknown command: ${command}. Available commands: ${Object.keys(commands).join(', ')}`,\n\t\t);\n\t\treturn;\n\t}\n\n\tawait run({ args });\n}\n\nmain();\n"],"mappings":";;;;;;;;;;;AAWA,MAAM,WAAW;CAAE;CAAO;CAAK;CAAQ;CAAM;CAAM,SAAA;CAAS;CAAM;AAAK;AAEvE,eAAe,OAAO;CACrB,MAAM,CAAC,SAAS,GAAG,QAAQ,KAAK,MAAM,CAAC;CAEvC,IAAI,CAAC,SAAS;EACb,QAAQ,KAAK,4CAA4C,OAAO,KAAK,QAAQ,CAAC,CAAC,KAAK,IAAI,EAAE,GAAG;EAC7F;CACD;CAEA,MAAM,MAAM,SAAS;CACrB,IAAI,CAAC,KAAK;EACT,QAAQ,KACP,oBAAoB,QAAQ,wBAAwB,OAAO,KAAK,QAAQ,CAAC,CAAC,KAAK,IAAI,GACpF;EACA;CACD;CAEA,MAAM,IAAI,EAAE,KAAK,CAAC;AACnB;AAEA,KAAK"}