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

@@ -1,12 +1,12 @@
import chalk from 'chalk';
import Koa from 'koa';
import inquirer from 'inquirer';
import { sh } from 'tasksfile';
// import { sh } from 'tasksfile';
import staticServer from 'koa-static';
import portfinder from 'portfinder';
import { resolve } from 'path';
import viteConfig from '../../vite.config';
import { getIPAddress } from '../utils';
import { getIPAddress, run } from '../utils';
const BUILD = 1;
const NO_BUILD = 2;
@@ -53,10 +53,11 @@ export const runPreview = async () => {
});
const { type } = await prompt;
if (type === BUILD) {
await sh('npm run build', {
async: true,
nopipe: true,
});
await run('npm', ['run', 'build']);
// await sh('npm run build', {
// async: true,
// nopipe: true,
// });
}
startApp();
};