UNPKG

fe-core-cli

Version:

All-in-one scaffolding, cli integrated with Vue3 ecological chain, cli of H5 page, mock template cli of Node

14 lines (12 loc) 323 B
import shelljs from 'shelljs' import { closeLoading } from './loading-utils' export const execCmd = (cmd: string) => new Promise((resolve, reject) => { shelljs.exec(cmd, (err, stdout, stderr) => { if (err) { closeLoading() reject(new Error(stderr)) } return resolve('') }) })