forked from microsoft/devicescript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrunner.js
More file actions
22 lines (22 loc) · 757 Bytes
/
runner.js
File metadata and controls
22 lines (22 loc) · 757 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
function mymain(m) {
m.setupWebsocketTransport("ws://localhost:8081").then(
() => {
m.devsSetDeviceId("1989f4eee0ebe206")
m.devsStart()
fetch("built/bytecode.devs").then(r => {
if (r.status == 200)
r.arrayBuffer().then(v => m.devsDeploy(new Uint8Array(v)))
else
console.log(
"you can copy or symlink built/bytecode.devs to devicescript-vm/built/bytecode.devs to pre-load it here"
)
})
},
err => {
console.log(
"failed to connect to devtools; please run 'jacdac devtools' in console"
)
}
)
}
Module().then(mymain)