-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes to support next npm publish - will it work?
- Loading branch information
Showing
6 changed files
with
17 additions
and
90 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 +1,3 @@ | ||
node_modules | ||
packed_ruby.wasm | ||
spacewalk.js |
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
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
cp ../packaging/packed_ruby.wasm . | ||
cp ../test/cache/spacewalk.js . | ||
npm publish --access public |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -2,8 +2,9 @@ | |
// version we used to build the Wasm package below? | ||
import { DefaultRubyVM } from "https://cdn.jsdelivr.net/npm/@ruby/[email protected]/dist/browser/+esm"; | ||
|
||
// For Locally-compiled Ruby.wasm VM: | ||
const response = await fetch("./packed_ruby.wasm"); | ||
// For Ruby.wasm VM: | ||
const packedURL = import.meta.url.split("/").slice(0,-1).join("/") + "/packed_ruby.wasm"; | ||
const response = await fetch(packedURL); | ||
const module = await WebAssembly.compile(await response.arrayBuffer()); | ||
|
||
const { vm } = await DefaultRubyVM(module); | ||
|
@@ -48,10 +49,8 @@ async function runShoesApps(vm) { | |
if (script) { | ||
const { scriptContent, evalStyle } = script; | ||
vm.eval(scriptContent); | ||
break; | ||
} | ||
} | ||
|
||
} | ||
|
||
async function loadScriptAsync(tag) { | ||
|