feat: call executable file directly

This commit is contained in:
pengfei.zhou 2021-12-07 16:24:47 +08:00 committed by osborn
parent 0477e5790b
commit 52ffe8d80c
2 changed files with 4 additions and 4 deletions

View File

@ -4,7 +4,7 @@ import fs from "fs";
import { glob } from "./util"; import { glob } from "./util";
import path from "path"; import path from "path";
export async function build() { export async function build() {
let ret = await Shell.exec("node", ["node_modules/.bin/tsc", "-p", "."], { let ret = await Shell.exec("node_modules/.bin/tsc", ["-p", "."], {
env: process.env, env: process.env,
consoleHandler: (info) => { consoleHandler: (info) => {
console.log(info); console.log(info);
@ -14,7 +14,7 @@ export async function build() {
console.log("Compile error".red); console.log("Compile error".red);
return -1; return -1;
} }
ret = await Shell.exec("node", ["node_modules/.bin/rollup", "-c",], { ret = await Shell.exec("node_modules/.bin/rollup", ["-c",], {
env: process.env, env: process.env,
consoleHandler: (info) => { consoleHandler: (info) => {
console.log(info); console.log(info);

View File

@ -78,10 +78,10 @@ export default async function dev() {
} }
}); });
const tscProcess = exec("node node_modules/.bin/tsc -w -p .", { const tscProcess = exec("node_modules/.bin/tsc -w -p .", {
env: process.env, env: process.env,
}); });
const rollupProcess = exec("node node_modules/.bin/rollup -c -w", { const rollupProcess = exec("node_modules/.bin/rollup -c -w", {
env: process.env, env: process.env,
}); });
[tscProcess, rollupProcess].forEach(e => { [tscProcess, rollupProcess].forEach(e => {