Browse Source

Get everything (I can) running

Bradlee Speice 8 months ago
parent
commit
e7edfc1e8c
2 changed files with 15 additions and 0 deletions
  1. 5
    0
      README.md
  2. 10
    0
      percy/static/app_loader.js

+ 5
- 0
README.md View File

@@ -0,0 +1,5 @@
1
+# Electron applications in Rust
2
+
3
+Each app is a starter example, and can be run with `yarn install && yarn start`.
4
+
5
+`stdweb` and `yew` examples currently don't run.

+ 10
- 0
percy/static/app_loader.js View File

@@ -0,0 +1,10 @@
1
+const app = import("./percy")
2
+app.then(module => {
3
+    console.log("Finished resolving application bundle")
4
+    let rootNode = document.getElementById('root')
5
+    rootNode.parentElement.replaceChild(module.main(), rootNode)
6
+    rootNode = document.getElementById('root')
7
+}, (e) => {
8
+    console.log("Unable to resolve application bundle: ")
9
+    console.log(e)
10
+})

Loading…
Cancel
Save