Closed x3ro closed 1 year ago
Hi @x3ro .
Thank you for your kind words π And thanks for the suggestion, I think it's a great idea! Anything that makes it easier to get started is worth the effort IMO π
The only thing I think is missing is updating the README. Maybe add a new README in the web
folder which describes how to build for web? Basically what is in this README at the moment, so move and update that. Maybe a link from the main README would be good as well?
About the bash script, I would actually rather avoid it than expand on it. Could it be replaced by a step-by-step guide in the README instead? My worry is that I have to maintain the script, so a guide is less work for me.
About the bash script, I would actually rather avoid it than expand on it. Could it be replaced by a step-by-step guide in the README instead? My worry is that I have to maintain the script, so a guide is less work for me.
Makes sense. I like the bash script approach because it eliminates some easy errors, such as "I'm executing the commands from the wrong directory", but I get that maintaining bash scripts isn't fun π I'll incorporate the steps in the README ππΌ
So, to summarize, I will
web/README.md
examples/README.md
, but leave the list of examples in thereweb/README.md
in the main repository README.Does that sounds good?
It sounds perfect, thank you π
And just for the record, if this was work related code, I would prefer a bash script as well. I just really don't want to maintain bash scripts in my free time π
Okay, finally have gotten around to updating this π
There is a README now that explains the steps. One thing I noticed is that mouse interaction isn't working for some reason π€ I'll investigate, but perhaps you have an idea why that is
Nice! Thanks for the contribution πͺ
Hey @asny! Thanks for building this crate, it's been a pleasure to use so far :)
I'm using it for WASM thingsβ’, and in the beginning it wasn't completely obvious to me how to get the examples running the browser. I saw in #277 that this may be made easier by tooling in the future. In the meantime, I was wondering whether you'd want to add something like what I'm proposing here, to help people get started with your crate and WASM.
Usage
npm install
in theweb/
directory./build_and_serve.sh
(optionally with the name of the example you want to build)http://localhost:8080
, where you should see the exampleTODO
I haven't polised this yet, since I wasn't sure whether or not this would be accepted.
Script: Detect whethernpm
is installed, and display a nice error if its notScript: Runnpm install automatically
web/
directoryweb/
directory in main repository README