index.ts 429 B

1234567891011121314151617181920212223
  1. import { consola } from '@vben/node-utils';
  2. import { cac } from 'cac';
  3. import { run } from './run';
  4. try {
  5. const turboRun = cac('turbo-run');
  6. turboRun
  7. .command('[script]')
  8. .usage(`Run turbo interactively.`)
  9. .action(async (command: string) => {
  10. run({ command });
  11. });
  12. turboRun.usage('turbo-run');
  13. turboRun.help();
  14. turboRun.parse();
  15. } catch (error) {
  16. consola.error(error);
  17. process.exit(1);
  18. }