A quick page to host a snippet emulator for development

This commit is contained in:
2023-01-26 15:16:49 -06:00
parent 7b67ff73ea
commit de3bac0084
2 changed files with 22 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
import { createRoot } from 'react-dom/client'
import React from "react";
import SnippetEmulator from "./snippet_emulator";
import init, { WasmCPU, assemble_snippet } from '../pkg/vweb.js'
init().then(async () => {
createRoot(document.getElementsByClassName('react-root')[0])
.render(React.createElement(SnippetEmulator, {snippet: 'push 0'}))
})