fix pwsh build script

This commit is contained in:
Avad3 2024-07-17 11:38:48 -04:00
parent fafeef060a
commit 76035db4e9

View file

@ -8,7 +8,7 @@ $WASM = "rewriter/out/rewriter_bg.wasm"
Measure-Command -Expression { wasm-opt -Oz --vacuum --dce --enable-threads --enable-bulk-memory --enable-simd "$WASM" -o rewriter/out/optimized.wasm }
Write-Output -n "self.WASM = '" > static/wasm.js
[System.Convert]::ToBase64String([System.IO.File]::ReadAllBytes("rewriter/out/optimized.wasm")) >> static/wasm.js
Write-Output -n "';" >> static/wasm.js
Write-Output "self.WASM = '" | Out-File -NoNewline -FilePath static/wasm.js
[System.Convert]::ToBase64String([System.IO.File]::ReadAllBytes("rewriter/out/optimized.wasm")) | Out-File -Append -NoNewline -FilePath static/wasm.js
Write-Output "';" | Out-File -Append -NoNewline -FilePath static/wasm.js
Write-Output "Rewriter Build Complete!"