UNPKG

@baseplate-dev/create-project

Version:

CLI starter kit for creating a new Baseplate project

17 lines (16 loc) 386 B
import { execa } from 'execa'; import ora from 'ora'; export async function exec(command, cwd) { const spinner = ora({ text: `Running ${command}...`, }).start(); try { const [cmd, ...args] = command.split(' '); await execa(cmd, args, { cwd }); spinner.succeed(); } catch (error) { spinner.fail(); throw error; } }