|
@ -8,6 +8,8 @@ import * as ora from "ora" |
|
|
import * as chalk from "chalk" |
|
|
import * as chalk from "chalk" |
|
|
import * as minimist from "minimist" |
|
|
import * as minimist from "minimist" |
|
|
|
|
|
|
|
|
|
|
|
const {buildMain} = require("./webpack/runMain") |
|
|
|
|
|
|
|
|
import { exec, spawn, ChildProcess } from "child_process" |
|
|
import { exec, spawn, ChildProcess } from "child_process" |
|
|
import { watch, rollup, OutputOptions } from "rollup" |
|
|
import { watch, rollup, OutputOptions } from "rollup" |
|
|
import { waitOn } from "./utils" |
|
|
import { waitOn } from "./utils" |
|
@ -62,14 +64,14 @@ function tscCheck() { |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
async function buildMain() { |
|
|
// async function buildMain() {
|
|
|
try { |
|
|
// try {
|
|
|
const build = await rollup(opts) |
|
|
// const build = await rollup(opts)
|
|
|
build.write(opts.output as OutputOptions) |
|
|
// build.write(opts.output as OutputOptions)
|
|
|
} catch (error) { |
|
|
// } catch (error) {
|
|
|
console.log(`\n${TAG} ${chalk.red("构建报错")}\n`, error, "\n") |
|
|
// console.log(`\n${TAG} ${chalk.red("构建报错")}\n`, error, "\n")
|
|
|
} |
|
|
// }
|
|
|
} |
|
|
// }
|
|
|
|
|
|
|
|
|
function buildElectron() { |
|
|
function buildElectron() { |
|
|
return new Promise((resolve, reject) => { |
|
|
return new Promise((resolve, reject) => { |
|
|