Adam Cooper
10/09/2022, 9:11 PMapplication {
mainClass.set("...")
}
for JavaScript?hfhbd
10/09/2022, 9:27 PMbinaries.executable()
and a main
function.Adam Cooper
10/09/2022, 9:33 PMhfhbd
10/10/2022, 6:51 AMAdam Cooper
10/10/2022, 3:32 PMmain
in my JavaScript module, but i can see in the compiled JavaScript that it's in a function called main
that would presumably have to be called from somewhere. The code won't run on script load.hfhbd
10/10/2022, 4:44 PMAdam Cooper
10/10/2022, 4:51 PMAdam Cooper
10/10/2022, 4:52 PMAdam Cooper
10/10/2022, 4:52 PMfun main() {
console.log("JavaScript loaded!")
}
And I've attached the compiled JavaScript as snippetshfhbd
10/10/2022, 4:54 PMAdam Cooper
10/10/2022, 4:56 PMAdam Cooper
10/10/2022, 4:57 PMstatic("scripts") {
resource("adamcooper-sh.js")
resource("adamcooper-sh.js.map")
}
hfhbd
10/10/2022, 4:59 PMAdam Cooper
10/10/2022, 5:01 PMscript(type = ScriptType.textJavaScript, src = "/static/scripts/adamcooper-sh.js") {}
in the bodyhfhbd
10/10/2022, 5:05 PMAdam Cooper
10/10/2022, 5:12 PMAdam Cooper
10/10/2022, 5:14 PM./wordlesolver_files
instead of /static
, although it loads the stylesheet from that same path successfully. The logs also show the JS is downloaded:
13:10:45.320 [DefaultDispatcher-worker-1] INFO ktor.application - 200 OK: GET - /static/scripts/adamcooper-sh.js
13:10:48.378 [DefaultDispatcher-worker-1] INFO ktor.application - 200 OK: GET - /static/style.css
13:10:48.434 [DefaultDispatcher-worker-11] INFO ktor.application - 200 OK: GET - /static/scripts/adamcooper-sh.js.map