We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 791c7c6 commit 6fde9e5Copy full SHA for 6fde9e5
patch.wasm.mjs
@@ -1,8 +1,8 @@
1
import { readFileSync, rmSync, writeFileSync } from "fs";
2
3
const cargo = readFileSync(`./src/wasm/Cargo.toml`, "utf8")
4
-const packg = cargo.split("\n\n").find(p => p.startsWith("[package]"))
5
-const namel = packg.split("\n").find(l => l.startsWith("name = "))
+const packp = cargo.split("\n\n").find(p => p.startsWith("[package]"))
+const namel = packp.split("\n").find(l => l.startsWith("name = "))
6
const name = namel.split(" = ")[1].replaceAll('"', "").trim()
7
8
const wasm = readFileSync(`./src/wasm/pkg/${name}_bg.wasm`)
0 commit comments