diff --git a/.gitignore b/.gitignore index 6a829dbe..b86807d7 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ target/ node_modules/ .idea/ pkg/ +dist/ cargo-timing*.html **/cypress/screenshots -**/cypress/videos \ No newline at end of file +**/cypress/videos diff --git a/dom/examples/todo/README.md b/dom/examples/todo/README.md index b229ea68..6179bd90 100644 --- a/dom/examples/todo/README.md +++ b/dom/examples/todo/README.md @@ -4,15 +4,12 @@ Commands all assume the working directory is the repository root. ## Serving -Build the example and start the project's local HTTP server: +First install [Trunk](https://trunkrs.dev/). ``` -$ cargo build-dom-todo # for live-watching rebuilds use `cargo dom-flow` -$ cargo ofl serve +$ trunk serve ``` -In VSCode the same can be accomplished by running the `dom crates` and `project server` tasks. - ## Using To use the example locally, follow the directions for [serving](#serving) the project and diff --git a/dom/examples/todo/index.html b/dom/examples/todo/index.html index 9889fcda..6184815a 100644 --- a/dom/examples/todo/index.html +++ b/dom/examples/todo/index.html @@ -20,14 +20,6 @@

Created by anp

Part of moxie-dom

- - - \ No newline at end of file + diff --git a/dom/examples/todo/src/lib.rs b/dom/examples/todo/src/lib.rs index ee8dfef0..f556c2fe 100644 --- a/dom/examples/todo/src/lib.rs +++ b/dom/examples/todo/src/lib.rs @@ -96,6 +96,8 @@ pub fn setup_tracing() { info!("tracing initialized"); }); console_error_panic_hook::set_once(); + use moxie_dom::raw::sys::window; + boot(window().unwrap().document().unwrap().get_element_by_id("content").unwrap().into()); } #[wasm_bindgen]