UNPKG

bluecodex

Version:

Turn repetitive dev tasks into CLI commands with Typescript

18 lines (15 loc) 475 B
import { ioc } from "../ioc"; import { prompt } from "../prompt/prompt"; import { runCommand } from "../run/run-command"; import { initCommand } from "./init/init-command"; export async function askToInit() { const wantsToInit = await prompt.confirm( `Would you like to ${ioc.theme.commandName(initCommand)} kick things off?`, ); if (wantsToInit) { return runCommand(initCommand, []); } else { console.log("Ok then! See ya later."); return 0; } }