tried code
import spasm.spa;
@safe:
nothrow:
struct App
{
mixin Node!"div";
@prop innerText = "Hello World!";
}
mixin Spa!App;
in a fresh project. I tried looking around for hints in the readme but didn't really find anything (the README doesn't even tell me to import spasm.spa;)
I then found the function in the spasm/modules/spa.js but had no idea how to even use that and why it's not added. Checked out the spasm/modules/index.js because that looked promising and at the top it told me it's generated with dub run spasm:webpack-bootstrap
I tried running dub run spasm:webpack-bootstrap then and it said that doesn't exist as it is in fact dub run spasm:bootstrap-webpack
Looking for this in the README it says to run dub spasm:webidl -- --bindgen when adding JS bindings.
I tried that and dub complained that it's an invalid command (it should be dub run spasm:webidl -- --bindgen)
Now after it's generated with that file it says the file is generated using that bindgen command and some new "bindings.js" got added but I have no idea where that code even came from and what's the difference from not having it.
Could you maybe add some more information about the index.js file and what the bootstrap-webpack and idl binding generator actually do? Do they parse my D code to determine the libraries or how do they work?
tried code
in a fresh project. I tried looking around for hints in the readme but didn't really find anything (the README doesn't even tell me to
import spasm.spa;)I then found the function in the spasm/modules/spa.js but had no idea how to even use that and why it's not added. Checked out the
spasm/modules/index.jsbecause that looked promising and at the top it told me it's generated withdub run spasm:webpack-bootstrapI tried running
dub run spasm:webpack-bootstrapthen and it said that doesn't exist as it is in factdub run spasm:bootstrap-webpackLooking for this in the README it says to run
dub spasm:webidl -- --bindgenwhen adding JS bindings.I tried that and dub complained that it's an invalid command (it should be
dub run spasm:webidl -- --bindgen)Now after it's generated with that file it says the file is generated using that bindgen command and some new "bindings.js" got added but I have no idea where that code even came from and what's the difference from not having it.
Could you maybe add some more information about the index.js file and what the bootstrap-webpack and idl binding generator actually do? Do they parse my D code to determine the libraries or how do they work?