aquavm/avm/client/build_wasm.ps1
2021-05-10 14:25:34 +03:00

12 lines
333 B
PowerShell

New-Item -ItemType Directory -Force -Path ./wasm
wasm-pack build ../../air-interpreter --no-typescript --release -d wasm
$base64string = [Convert]::ToBase64String([IO.File]::ReadAllBytes('./wasm/air_interpreter_client_bg.wasm'))
$data = "// auto-generated
module.exports = `"${base64string}`""
$data | Out-File "./src/wasm.js"