briven.js9 lines · main
| 1 | #!/usr/bin/env node |
| 2 | import { pathToFileURL } from 'node:url'; |
| 3 | import { resolve, dirname } from 'node:path'; |
| 4 | import { fileURLToPath } from 'node:url'; |
| 5 | |
| 6 | const here = dirname(fileURLToPath(import.meta.url)); |
| 7 | const mod = await import(pathToFileURL(resolve(here, '../dist/cli/index.js')).href); |
| 8 | const code = await mod.run(process.argv.slice(2)); |
| 9 | process.exit(typeof code === 'number' ? code : 0); |