@bomb.sh/tools
Version:
The internal dev, build, and lint CLI for Bombshell projects
1 lines • 1.35 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 { test } from \"./commands/test.ts\";\n\nconst commands = { build, dev, format, init, lint, test };\n\nasync function main() {\n\tconst [command, ...args] = argv.slice(2);\n\n\tif (!command) {\n\t\tconsole.log(`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.log(\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":";;;;;;;;;;AASA,MAAM,WAAW;CAAE;CAAO;CAAK;CAAQ;CAAM;CAAM;CAAM;AAEzD,eAAe,OAAO;CACrB,MAAM,CAAC,SAAS,GAAG,QAAQ,KAAK,MAAM,EAAE;AAExC,KAAI,CAAC,SAAS;AACb,UAAQ,IAAI,4CAA4C,OAAO,KAAK,SAAS,CAAC,KAAK,KAAK,CAAC,IAAI;AAC7F;;CAGD,MAAM,MAAM,SAAS;AACrB,KAAI,CAAC,KAAK;AACT,UAAQ,IACP,oBAAoB,QAAQ,wBAAwB,OAAO,KAAK,SAAS,CAAC,KAAK,KAAK,GACpF;AACD;;AAGD,OAAM,IAAI,EAAE,MAAM,CAAC;;AAGpB,MAAM"}