Use execSync instead of spawnSync in buildCore

This commit is contained in:
wooferzfg
2020-04-13 23:22:42 -05:00
parent 74befe0dd1
commit 3c1ca2fb8e
+7 -19
View File
@@ -1,36 +1,24 @@
const { spawnSync } = require("child_process");
const { execSync } = require("child_process");
const fs = require("fs");
spawnSync(
"cargo",
["run"],
execSync(
"cargo run",
{
cwd: "livesplit-core/capi/bind_gen",
stdio: "inherit",
},
);
spawnSync(
"cargo",
[
"build",
"-p", "cdylib",
"--features", "wasm-web",
"--target", "wasm32-unknown-unknown",
"--release",
],
execSync(
"cargo build -p cdylib --features wasm-web --target wasm32-unknown-unknown --release",
{
cwd: "livesplit-core",
stdio: "inherit",
},
);
spawnSync(
"wasm-bindgen",
[
"livesplit-core/target/wasm32-unknown-unknown/release/livesplit_core.wasm",
"--out-dir", "src/livesplit-core",
],
execSync(
"wasm-bindgen livesplit-core/target/wasm32-unknown-unknown/release/livesplit_core.wasm --out-dir src/livesplit-core",
{
stdio: "inherit",
},