-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only load glkaudio if it's actually needed
- Loading branch information
1 parent
8b028d5
commit 2c60d01
Showing
4 changed files
with
12 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
#!/bin/bash | ||
|
||
npx wasm-pack build --target web | ||
rm pkg/.gitignore | ||
rm pkg/.gitignore | ||
|
||
# Inject an export so that we can synchronously check if we've already initiated the module | ||
echo "export {wasm}" >> pkg/glkaudio.js | ||
echo "export let wasm: InitOutput | undefined" >> pkg/glkaudio.d.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -159,3 +159,4 @@ async function __wbg_init(module_or_path) { | |
|
||
export { initSync }; | ||
export default __wbg_init; | ||
export {wasm} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters