diff --git a/README.md b/README.md new file mode 100644 index 0000000..20262c0 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# Electron applications in Rust + +Each app is a starter example, and can be run with `yarn install && yarn start`. + +`stdweb` and `yew` examples currently don't run. \ No newline at end of file diff --git a/percy/static/app_loader.js b/percy/static/app_loader.js new file mode 100644 index 0000000..2b50a7e --- /dev/null +++ b/percy/static/app_loader.js @@ -0,0 +1,10 @@ +const app = import("./percy") +app.then(module => { + console.log("Finished resolving application bundle") + let rootNode = document.getElementById('root') + rootNode.parentElement.replaceChild(module.main(), rootNode) + rootNode = document.getElementById('root') +}, (e) => { + console.log("Unable to resolve application bundle: ") + console.log(e) +}) \ No newline at end of file