fix: replace taskfile module

This commit is contained in:
vben
2020-10-14 22:57:52 +08:00
parent ddc3786b16
commit e828baa67b
7 changed files with 90 additions and 59 deletions

View File

@@ -3,6 +3,7 @@ import path from 'path';
import { networkInterfaces } from 'os';
import dotenv from 'dotenv';
import chalk from 'chalk';
import execa from 'execa';
export const isFunction = (arg: unknown): arg is (...args: any[]) => any =>
typeof arg === 'function';
@@ -147,3 +148,6 @@ export function warnConsole(message: any) {
export function getCwdPath(...dir: string[]) {
return path.resolve(process.cwd(), ...dir);
}
export const run = (bin: string, args: any, opts = {}) =>
execa(bin, args, { stdio: 'inherit', ...opts });