From 3f3db39c2827106070161e34b2fd579ae2371f0f Mon Sep 17 00:00:00 2001 From: Evan Almloff Date: Sun, 15 Jan 2023 15:18:12 -0600 Subject: [PATCH 1/4] update doc links --- README.md | 2 +- docs/posts/release.md | 4 ++-- docs/reference/src/README_pt-br.md | 2 +- docs/reference/src/platforms/desktop.md | 2 +- notes/README/ZH_CN.md | 2 +- packages/autofmt/README.md | 2 +- packages/core-macro/README.md | 2 +- packages/desktop/README.md | 4 ++-- packages/desktop/src/readme.md | 2 +- packages/dioxus/README.md | 4 ++-- packages/hooks/README.md | 2 +- packages/html/README.md | 2 +- packages/interpreter/README.md | 2 +- packages/liveview/README.md | 2 +- packages/mobile/README.md | 4 ++-- packages/native-core-macro/README.md | 2 +- packages/native-core/README.md | 2 +- packages/router/README.md | 2 +- packages/rsx-rosetta/README.md | 2 +- packages/rsx/README.md | 2 +- packages/web/README.md | 2 +- translations/pt-br/README.md | 6 +++--- 22 files changed, 28 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 4ef6acfee..5b680a1ba 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ | Examples | - Guide + Guide | 中文 | diff --git a/docs/posts/release.md b/docs/posts/release.md index b40b451cc..171664dd3 100644 --- a/docs/posts/release.md +++ b/docs/posts/release.md @@ -63,7 +63,7 @@ This very site is built with Dioxus, and the source code is available [here](htt To get started with Dioxus, check out any of the "Getting Started" guides for your platform of choice, or check out the GitHub Repository for more details. -- [Getting Started with Dioxus](https://dioxuslabs.com/guide) +- [Getting Started with Dioxus](https://dioxuslabs.com/guide/en) - [Getting Started with Web](https://dioxuslabs.com/reference/web) - [Getting Started with Desktop](https://dioxuslabs.com/reference/desktop) - [Getting Started with Mobile](https://dioxuslabs.com/reference/mobile) @@ -163,7 +163,7 @@ Today, to publish a Dioxus app, you don't need NPM/WebPack/Parcel/etc. Dioxus si ## Show me more -Here, we'll dive into some features of Dioxus and why it's so fun to use. The [guide](https://dioxuslabs.com/guide/) serves as a deeper and more comprehensive look at what Dioxus can do. +Here, we'll dive into some features of Dioxus and why it's so fun to use. The [guide](https://dioxuslabs.com/guide/en/) serves as a deeper and more comprehensive look at what Dioxus can do. ## Building a new project is simple diff --git a/docs/reference/src/README_pt-br.md b/docs/reference/src/README_pt-br.md index c345da6bd..e76f43516 100644 --- a/docs/reference/src/README_pt-br.md +++ b/docs/reference/src/README_pt-br.md @@ -4,7 +4,7 @@ **Dioxus** é um framework e ecossistema para desenvolver interfaces rápidas, escaláveis e robustas com a linguagem de Programação Rust. Este guia irá ajudar você a começar com o Dioxus para Web, Desktop, Móvel e mais. -> Este livro é a Referência e Guias Avançados para o framework Dioxus. Para um tutorial em como de fato _usar_ o Dioxus, procure o [guia oficial](https://dioxuslabs.com/guide/). +> Este livro é a Referência e Guias Avançados para o framework Dioxus. Para um tutorial em como de fato _usar_ o Dioxus, procure o [guia oficial](https://dioxuslabs.com/guide/en/). ## Guias e Referência diff --git a/docs/reference/src/platforms/desktop.md b/docs/reference/src/platforms/desktop.md index d444b90e4..a6c85c21e 100644 --- a/docs/reference/src/platforms/desktop.md +++ b/docs/reference/src/platforms/desktop.md @@ -42,4 +42,4 @@ To configure the webview, menubar, and other important desktop-specific features ## Future Steps -Make sure to read the [Dioxus Guide](https://dioxuslabs.com/guide) if you already haven't! +Make sure to read the [Dioxus Guide](https://dioxuslabs.com/guide/en) if you already haven't! diff --git a/notes/README/ZH_CN.md b/notes/README/ZH_CN.md index 8b1e6185b..ca37f7be1 100644 --- a/notes/README/ZH_CN.md +++ b/notes/README/ZH_CN.md @@ -40,7 +40,7 @@ | 代码示例 | - 开发指南 + 开发指南 | English | diff --git a/packages/autofmt/README.md b/packages/autofmt/README.md index b0a418ee6..8cbd33d61 100644 --- a/packages/autofmt/README.md +++ b/packages/autofmt/README.md @@ -19,7 +19,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/guide/) | +[Guides](https://dioxuslabs.com/guide/en/) | [API Docs](https://docs.rs/dioxus-autofmt/latest/dioxus_autofmt) | [Chat](https://discord.gg/XgGxMSkvUM) diff --git a/packages/core-macro/README.md b/packages/core-macro/README.md index 60654396e..076a0d9a1 100644 --- a/packages/core-macro/README.md +++ b/packages/core-macro/README.md @@ -19,7 +19,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/guide/) | +[Guides](https://dioxuslabs.com/guide/en/) | [API Docs](https://docs.rs/dioxus-core-macro/latest/dioxus_core_macro) | [Chat](https://discord.gg/XgGxMSkvUM) diff --git a/packages/desktop/README.md b/packages/desktop/README.md index 9b1e7ad58..e122caf21 100644 --- a/packages/desktop/README.md +++ b/packages/desktop/README.md @@ -19,7 +19,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/guide/) | +[Guides](https://dioxuslabs.com/guide/en/) | [API Docs](https://docs.rs/dioxus-desktop/latest/dioxus_desktop) | [Chat](https://discord.gg/XgGxMSkvUM) @@ -30,7 +30,7 @@ This requires that webview is installed on the target system. WebView is installed by default on macOS and iOS devices, but might not come preinstalled on Windows or Linux devices. To fix these issues, follow the [instructions in the guide](guide-url). -[guide-url]: https://dioxuslabs.com/guide/setup.html#platform-specific-dependencies +[guide-url]: https://dioxuslabs.com/guide/en/setup.html#platform-specific-dependencies diff --git a/packages/desktop/src/readme.md b/packages/desktop/src/readme.md index 567b05fcf..ddc49507b 100644 --- a/packages/desktop/src/readme.md +++ b/packages/desktop/src/readme.md @@ -49,4 +49,4 @@ To configure the webview, menubar, and other important desktop-specific features ## Future Steps -Make sure to read the [Dioxus Guide](https://dioxuslabs.com/guide) if you already haven't! +Make sure to read the [Dioxus Guide](https://dioxuslabs.com/guide/en) if you already haven't! diff --git a/packages/dioxus/README.md b/packages/dioxus/README.md index 4dc007096..eaefa4fc7 100644 --- a/packages/dioxus/README.md +++ b/packages/dioxus/README.md @@ -9,8 +9,8 @@ This overview provides a brief introduction to Dioxus. For a more in-depth guide, make sure to check out: -- [Getting Started](https://dioxuslabs.com/guide/setup.html) -- [Book](https://dioxuslabs.com/guide/) +- [Getting Started](https://dioxuslabs.com/guide/en/setup.html) +- [Book](https://dioxuslabs.com/guide/en/) - [Reference](https://dioxuslabs.com/reference) - [Examples](https://github.com/DioxusLabs/example-projects) diff --git a/packages/hooks/README.md b/packages/hooks/README.md index 6d6f56d50..1e065475e 100644 --- a/packages/hooks/README.md +++ b/packages/hooks/README.md @@ -19,7 +19,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/guide/) | +[Guides](https://dioxuslabs.com/guide/en/) | [API Docs](https://docs.rs/dioxus-hooks/latest/dioxus_hooks) | [Chat](https://discord.gg/XgGxMSkvUM) diff --git a/packages/html/README.md b/packages/html/README.md index 7bae7e197..8dd81c545 100644 --- a/packages/html/README.md +++ b/packages/html/README.md @@ -19,7 +19,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/guide/) | +[Guides](https://dioxuslabs.com/guide/en/) | [API Docs](https://docs.rs/dioxus-html/latest/dioxus_html) | [Chat](https://discord.gg/XgGxMSkvUM) diff --git a/packages/interpreter/README.md b/packages/interpreter/README.md index cb01f2cc7..48fe641b1 100644 --- a/packages/interpreter/README.md +++ b/packages/interpreter/README.md @@ -19,7 +19,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/guide/) | +[Guides](https://dioxuslabs.com/guide/en/) | [API Docs](https://docs.rs/dioxus-interpreter-js/latest/dioxus_interpreter_js) | [Chat](https://discord.gg/XgGxMSkvUM) diff --git a/packages/liveview/README.md b/packages/liveview/README.md index 6ab109f8e..c7a7f2393 100644 --- a/packages/liveview/README.md +++ b/packages/liveview/README.md @@ -19,7 +19,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/guide/) | +[Guides](https://dioxuslabs.com/guide/en/) | [API Docs](https://docs.rs/dioxus-liveview/latest/dioxus_liveview) | [Chat](https://discord.gg/XgGxMSkvUM) diff --git a/packages/mobile/README.md b/packages/mobile/README.md index 7af09e970..d26408b36 100644 --- a/packages/mobile/README.md +++ b/packages/mobile/README.md @@ -18,7 +18,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/guide/) | +[Guides](https://dioxuslabs.com/guide/en/) | [API Docs](https://docs.rs/dioxus-mobile/latest/dioxus_mobile) | [Chat](https://discord.gg/XgGxMSkvUM) @@ -98,7 +98,7 @@ To configure the web view, menubar, and other important desktop-specific feature ## Future Steps -Make sure to read the [Dioxus Guide](https://dioxuslabs.com/guide) if you already haven't! +Make sure to read the [Dioxus Guide](https://dioxuslabs.com/guide/en) if you already haven't! diff --git a/packages/native-core-macro/README.md b/packages/native-core-macro/README.md index 90d7123b1..ea3966774 100644 --- a/packages/native-core-macro/README.md +++ b/packages/native-core-macro/README.md @@ -18,7 +18,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/guide/) | +[Guides](https://dioxuslabs.com/guide/en/) | [API Docs](https://docs.rs/dioxus-native-core-macro/latest/dioxus_native_core_macro) | [Chat](https://discord.gg/XgGxMSkvUM) diff --git a/packages/native-core/README.md b/packages/native-core/README.md index c467d37de..802e178fa 100644 --- a/packages/native-core/README.md +++ b/packages/native-core/README.md @@ -18,7 +18,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/guide/) | +[Guides](https://dioxuslabs.com/guide/en/) | [API Docs](https://docs.rs/dioxus-native-core/latest/dioxus_native_core) | [Chat](https://discord.gg/XgGxMSkvUM) diff --git a/packages/router/README.md b/packages/router/README.md index 43bc2df2b..5daa43365 100644 --- a/packages/router/README.md +++ b/packages/router/README.md @@ -18,7 +18,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/guide/) | +[Guides](https://dioxuslabs.com/guide/en/) | [API Docs](https://docs.rs/dioxus-router/latest/dioxus_router) | [Chat](https://discord.gg/XgGxMSkvUM) diff --git a/packages/rsx-rosetta/README.md b/packages/rsx-rosetta/README.md index bf811a5fe..6cf6c3b72 100644 --- a/packages/rsx-rosetta/README.md +++ b/packages/rsx-rosetta/README.md @@ -20,7 +20,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/guide/) | +[Guides](https://dioxuslabs.com/guide/en/) | [API Docs](https://docs.rs/rsx-rosetta/latest/rsx-rosetta) | [Chat](https://discord.gg/XgGxMSkvUM) diff --git a/packages/rsx/README.md b/packages/rsx/README.md index 707416b98..a189a2cf4 100644 --- a/packages/rsx/README.md +++ b/packages/rsx/README.md @@ -18,7 +18,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/guide/) | +[Guides](https://dioxuslabs.com/guide/en/) | [API Docs](https://docs.rs/dioxus-rsx/latest/dioxus_rsx) | [Chat](https://discord.gg/XgGxMSkvUM) diff --git a/packages/web/README.md b/packages/web/README.md index d3f4c1aeb..9a71e0c28 100644 --- a/packages/web/README.md +++ b/packages/web/README.md @@ -18,7 +18,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/guide/) | +[Guides](https://dioxuslabs.com/guide/en/) | [API Docs](https://docs.rs/dioxus-web/latest/dioxus_web) | [Chat](https://discord.gg/XgGxMSkvUM) diff --git a/translations/pt-br/README.md b/translations/pt-br/README.md index ef14a1af9..a50727662 100644 --- a/translations/pt-br/README.md +++ b/translations/pt-br/README.md @@ -40,7 +40,7 @@ | Exemplos | - Guia + Guia | 中文 @@ -83,7 +83,7 @@ Se você conhece React, então você já conhece o Dioxus. - + @@ -159,7 +159,7 @@ Dioxus é único no ecossistema do Rust por suportar: - SSR com `hydration` feito pelo Cliente - Suporte à aplicação Desktop -Para mais informações sobre quais funções estão atualmente disponíveis e para o progresso futuro, veja [O Guia](https://dioxuslabs.com/guide/). +Para mais informações sobre quais funções estão atualmente disponíveis e para o progresso futuro, veja [O Guia](https://dioxuslabs.com/guide/pt-br/). ## Projeto dentro do ecossistema Dioxus From a51f67c2ecf55583d45695e4c65efbd254830791 Mon Sep 17 00:00:00 2001 From: Evan Almloff Date: Sat, 18 Feb 2023 18:38:30 -0600 Subject: [PATCH 2/4] add version to docs links in readmes --- packages/autofmt/README.md | 2 +- packages/core-macro/README.md | 2 +- packages/desktop/README.md | 4 ++-- packages/desktop/src/readme.md | 2 +- packages/dioxus/README.md | 5 ++--- packages/hooks/README.md | 2 +- packages/hot-reload/README.md | 2 +- packages/html/README.md | 2 +- packages/interpreter/README.md | 2 +- packages/liveview/README.md | 2 +- packages/mobile/README.md | 4 ++-- packages/native-core-macro/README.md | 2 +- packages/native-core/README.md | 2 +- packages/router/README.md | 2 +- packages/rsx-rosetta/README.md | 2 +- packages/rsx/README.md | 2 +- packages/ssr/README.md | 7 +++---- packages/web/README.md | 2 +- 18 files changed, 23 insertions(+), 25 deletions(-) diff --git a/packages/autofmt/README.md b/packages/autofmt/README.md index 8cbd33d61..bd934f2c7 100644 --- a/packages/autofmt/README.md +++ b/packages/autofmt/README.md @@ -19,7 +19,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/guide/en/) | +[Guides](https://dioxuslabs.com/docs/0.3/guide/en/) | [API Docs](https://docs.rs/dioxus-autofmt/latest/dioxus_autofmt) | [Chat](https://discord.gg/XgGxMSkvUM) diff --git a/packages/core-macro/README.md b/packages/core-macro/README.md index 076a0d9a1..bcf1572cf 100644 --- a/packages/core-macro/README.md +++ b/packages/core-macro/README.md @@ -19,7 +19,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/guide/en/) | +[Guides](https://dioxuslabs.com/docs/0.3/guide/en/) | [API Docs](https://docs.rs/dioxus-core-macro/latest/dioxus_core_macro) | [Chat](https://discord.gg/XgGxMSkvUM) diff --git a/packages/desktop/README.md b/packages/desktop/README.md index e122caf21..964f90495 100644 --- a/packages/desktop/README.md +++ b/packages/desktop/README.md @@ -19,7 +19,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/guide/en/) | +[Guides](https://dioxuslabs.com/docs/0.3/guide/en/) | [API Docs](https://docs.rs/dioxus-desktop/latest/dioxus_desktop) | [Chat](https://discord.gg/XgGxMSkvUM) @@ -30,7 +30,7 @@ This requires that webview is installed on the target system. WebView is installed by default on macOS and iOS devices, but might not come preinstalled on Windows or Linux devices. To fix these issues, follow the [instructions in the guide](guide-url). -[guide-url]: https://dioxuslabs.com/guide/en/setup.html#platform-specific-dependencies +[guide-url]: https://dioxuslabs.com/docs/0.3/guide/en/getting_started/desktop.html diff --git a/packages/desktop/src/readme.md b/packages/desktop/src/readme.md index ddc49507b..5c22f015b 100644 --- a/packages/desktop/src/readme.md +++ b/packages/desktop/src/readme.md @@ -49,4 +49,4 @@ To configure the webview, menubar, and other important desktop-specific features ## Future Steps -Make sure to read the [Dioxus Guide](https://dioxuslabs.com/guide/en) if you already haven't! +Make sure to read the [Dioxus Guide](https://dioxuslabs.com/docs/0.3/guide/en) if you already haven't! diff --git a/packages/dioxus/README.md b/packages/dioxus/README.md index eaefa4fc7..31fff88fa 100644 --- a/packages/dioxus/README.md +++ b/packages/dioxus/README.md @@ -9,9 +9,8 @@ This overview provides a brief introduction to Dioxus. For a more in-depth guide, make sure to check out: -- [Getting Started](https://dioxuslabs.com/guide/en/setup.html) -- [Book](https://dioxuslabs.com/guide/en/) -- [Reference](https://dioxuslabs.com/reference) +- [Getting Started](https://dioxuslabs.com/docs/0.3/guide/en/getting_started/index.html) +- [Book](https://dioxuslabs.com/docs/0.3/guide/en/) - [Examples](https://github.com/DioxusLabs/example-projects) # Overview and Goals diff --git a/packages/hooks/README.md b/packages/hooks/README.md index 1e065475e..6c77867de 100644 --- a/packages/hooks/README.md +++ b/packages/hooks/README.md @@ -19,7 +19,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/guide/en/) | +[Guides](https://dioxuslabs.com/docs/0.3/guide/en/) | [API Docs](https://docs.rs/dioxus-hooks/latest/dioxus_hooks) | [Chat](https://discord.gg/XgGxMSkvUM) diff --git a/packages/hot-reload/README.md b/packages/hot-reload/README.md index 126c42103..60b7b9c87 100644 --- a/packages/hot-reload/README.md +++ b/packages/hot-reload/README.md @@ -19,7 +19,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/guide/) | +[Guides](https://dioxuslabs.com/docs/0.3/guide/en) | [API Docs](https://docs.rs/dioxus-hot-reload/latest/dioxus_hot_reload) | [Chat](https://discord.gg/XgGxMSkvUM) diff --git a/packages/html/README.md b/packages/html/README.md index 8dd81c545..59ec2f9ff 100644 --- a/packages/html/README.md +++ b/packages/html/README.md @@ -19,7 +19,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/guide/en/) | +[Guides](https://dioxuslabs.com/docs/0.3/guide/en/) | [API Docs](https://docs.rs/dioxus-html/latest/dioxus_html) | [Chat](https://discord.gg/XgGxMSkvUM) diff --git a/packages/interpreter/README.md b/packages/interpreter/README.md index 48fe641b1..90e390f56 100644 --- a/packages/interpreter/README.md +++ b/packages/interpreter/README.md @@ -19,7 +19,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/guide/en/) | +[Guides](https://dioxuslabs.com/docs/0.3/guide/en/) | [API Docs](https://docs.rs/dioxus-interpreter-js/latest/dioxus_interpreter_js) | [Chat](https://discord.gg/XgGxMSkvUM) diff --git a/packages/liveview/README.md b/packages/liveview/README.md index c7a7f2393..0a0e7de3a 100644 --- a/packages/liveview/README.md +++ b/packages/liveview/README.md @@ -19,7 +19,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/guide/en/) | +[Guides](https://dioxuslabs.com/docs/0.3/guide/en/) | [API Docs](https://docs.rs/dioxus-liveview/latest/dioxus_liveview) | [Chat](https://discord.gg/XgGxMSkvUM) diff --git a/packages/mobile/README.md b/packages/mobile/README.md index d26408b36..46da9061a 100644 --- a/packages/mobile/README.md +++ b/packages/mobile/README.md @@ -18,7 +18,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/guide/en/) | +[Guides](https://dioxuslabs.com/docs/0.3/guide/en/) | [API Docs](https://docs.rs/dioxus-mobile/latest/dioxus_mobile) | [Chat](https://discord.gg/XgGxMSkvUM) @@ -98,7 +98,7 @@ To configure the web view, menubar, and other important desktop-specific feature ## Future Steps -Make sure to read the [Dioxus Guide](https://dioxuslabs.com/guide/en) if you already haven't! +Make sure to read the [Dioxus Guide](https://dioxuslabs.com/docs/0.3/guide/en) if you already haven't! diff --git a/packages/native-core-macro/README.md b/packages/native-core-macro/README.md index ea3966774..6b8c13590 100644 --- a/packages/native-core-macro/README.md +++ b/packages/native-core-macro/README.md @@ -18,7 +18,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/guide/en/) | +[Guides](https://dioxuslabs.com/docs/0.3/guide/en/) | [API Docs](https://docs.rs/dioxus-native-core-macro/latest/dioxus_native_core_macro) | [Chat](https://discord.gg/XgGxMSkvUM) diff --git a/packages/native-core/README.md b/packages/native-core/README.md index 802e178fa..d412ca7cd 100644 --- a/packages/native-core/README.md +++ b/packages/native-core/README.md @@ -18,7 +18,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/guide/en/) | +[Guides](https://dioxuslabs.com/docs/0.3/guide/en/) | [API Docs](https://docs.rs/dioxus-native-core/latest/dioxus_native_core) | [Chat](https://discord.gg/XgGxMSkvUM) diff --git a/packages/router/README.md b/packages/router/README.md index 5daa43365..0e38512e8 100644 --- a/packages/router/README.md +++ b/packages/router/README.md @@ -18,7 +18,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/guide/en/) | +[Guides](https://dioxuslabs.com/docs/0.3/guide/en/) | [API Docs](https://docs.rs/dioxus-router/latest/dioxus_router) | [Chat](https://discord.gg/XgGxMSkvUM) diff --git a/packages/rsx-rosetta/README.md b/packages/rsx-rosetta/README.md index 6cf6c3b72..da3049d3c 100644 --- a/packages/rsx-rosetta/README.md +++ b/packages/rsx-rosetta/README.md @@ -20,7 +20,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/guide/en/) | +[Guides](https://dioxuslabs.com/docs/0.3/guide/en/) | [API Docs](https://docs.rs/rsx-rosetta/latest/rsx-rosetta) | [Chat](https://discord.gg/XgGxMSkvUM) diff --git a/packages/rsx/README.md b/packages/rsx/README.md index a189a2cf4..c20737167 100644 --- a/packages/rsx/README.md +++ b/packages/rsx/README.md @@ -18,7 +18,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/guide/en/) | +[Guides](https://dioxuslabs.com/docs/0.3/guide/en/) | [API Docs](https://docs.rs/dioxus-rsx/latest/dioxus_rsx) | [Chat](https://discord.gg/XgGxMSkvUM) diff --git a/packages/ssr/README.md b/packages/ssr/README.md index ef5931874..c5b91b7b8 100644 --- a/packages/ssr/README.md +++ b/packages/ssr/README.md @@ -8,10 +8,9 @@ ## Resources This crate is a part of the broader Dioxus ecosystem. For more resources about Dioxus, check out: -- [Getting Started](https://dioxuslabs.com/getting-started) -- [Book](https://dioxuslabs.com/book) -- [Reference](https://dioxuslabs.com/reference) -- [Community Examples](https://github.com/DioxusLabs/community-examples) +- [Getting Started](https://dioxuslabs.com/docs/0.3/guide/en/getting_started/index.html) +- [Book](https://dioxuslabs.com/docs/0.3/guide/en/) +- [Examples](https://github.com/DioxusLabs/example-projects) ## Overview diff --git a/packages/web/README.md b/packages/web/README.md index 9a71e0c28..87265c926 100644 --- a/packages/web/README.md +++ b/packages/web/README.md @@ -18,7 +18,7 @@ [discord-url]: https://discord.gg/XgGxMSkvUM [Website](https://dioxuslabs.com) | -[Guides](https://dioxuslabs.com/guide/en/) | +[Guides](https://dioxuslabs.com/docs/0.3/guide/en/) | [API Docs](https://docs.rs/dioxus-web/latest/dioxus_web) | [Chat](https://discord.gg/XgGxMSkvUM) From c012855659554e24e0f4cd47572acedbaa6cdb2f Mon Sep 17 00:00:00 2001 From: Evan Almloff Date: Wed, 22 Feb 2023 09:18:12 -0600 Subject: [PATCH 3/4] collect non-fatal errors in hot reloading --- packages/hot-reload/src/lib.rs | 34 +++++++--- .../src/hot_reload/hot_reloading_file_map.rs | 64 ++++++++++++++----- 2 files changed, 71 insertions(+), 27 deletions(-) diff --git a/packages/hot-reload/src/lib.rs b/packages/hot-reload/src/lib.rs index 20cc70a9a..5c79f9731 100644 --- a/packages/hot-reload/src/lib.rs +++ b/packages/hot-reload/src/lib.rs @@ -7,7 +7,7 @@ use std::{ use dioxus_core::Template; use dioxus_rsx::{ - hot_reload::{FileMap, UpdateResult}, + hot_reload::{FileMap, FileMapBuildResult, UpdateResult}, HotReloadingContext, }; use interprocess::local_socket::{LocalSocketListener, LocalSocketStream}; @@ -141,17 +141,24 @@ pub fn init(cfg: Config) { let temp_file = std::env::temp_dir().join("@dioxusin"); let channels = Arc::new(Mutex::new(Vec::new())); - let file_map = Arc::new(Mutex::new(FileMap::::new_with_filter( - crate_dir.clone(), - |path| { - // skip excluded paths - excluded_paths.iter().any(|p| path.starts_with(p)) || + let FileMapBuildResult { + map: file_map, + errors, + } = FileMap::::create_with_filter(crate_dir.clone(), |path| { + // skip excluded paths + excluded_paths.iter().any(|p| path.starts_with(p)) || // respect .gitignore gitignore .matched_path_or_any_parents(path, path.is_dir()) .is_ignore() - }, - ))); + }) + .unwrap(); + for err in errors { + if log { + println!("hot reloading failed to initialize:\n{err:?}"); + } + } + let file_map = Arc::new(Mutex::new(file_map)); if let Ok(local_socket_stream) = LocalSocketListener::bind(temp_file.as_path()) { let aborted = Arc::new(Mutex::new(false)); @@ -283,7 +290,7 @@ pub fn init(cfg: Config) { .unwrap() .update_rsx(path, crate_dir.as_path()) { - UpdateResult::UpdatedRsx(msgs) => { + Ok(UpdateResult::UpdatedRsx(msgs)) => { for msg in msgs { let mut i = 0; while i < channels.len() { @@ -299,13 +306,20 @@ pub fn init(cfg: Config) { } } } - UpdateResult::NeedsRebuild => { + Ok(UpdateResult::NeedsRebuild) => { drop(channels); if rebuild() { return; } break; } + Err(err) => { + if log { + println!( + "hot reloading failed to update rsx:\n{err:?}" + ); + } + } } } } diff --git a/packages/rsx/src/hot_reload/hot_reloading_file_map.rs b/packages/rsx/src/hot_reload/hot_reloading_file_map.rs index 156d64ce4..38c1d9105 100644 --- a/packages/rsx/src/hot_reload/hot_reloading_file_map.rs +++ b/packages/rsx/src/hot_reload/hot_reloading_file_map.rs @@ -17,6 +17,14 @@ pub enum UpdateResult { NeedsRebuild, } +/// The result of building a FileMap +pub struct FileMapBuildResult { + /// The FileMap that was built + pub map: FileMap, + /// Any errors that occurred while building the FileMap that were not fatal + pub errors: Vec, +} + pub struct FileMap { pub map: HashMap>)>, phantom: std::marker::PhantomData, @@ -24,46 +32,63 @@ pub struct FileMap { impl FileMap { /// Create a new FileMap from a crate directory - pub fn new(path: PathBuf) -> Self { - Self::new_with_filter(path, |_| false) + pub fn create(path: PathBuf) -> io::Result> { + Self::create_with_filter(path, |_| false) } /// Create a new FileMap from a crate directory - pub fn new_with_filter(path: PathBuf, mut filter: impl FnMut(&Path) -> bool) -> Self { + pub fn create_with_filter( + path: PathBuf, + mut filter: impl FnMut(&Path) -> bool, + ) -> io::Result> { + struct FileMapSearchResult { + map: HashMap>)>, + errors: Vec, + } fn find_rs_files( root: PathBuf, filter: &mut impl FnMut(&Path) -> bool, - ) -> io::Result>)>> { + ) -> io::Result { let mut files = HashMap::new(); + let mut errors = Vec::new(); if root.is_dir() { for entry in (fs::read_dir(root)?).flatten() { let path = entry.path(); if !filter(&path) { - files.extend(find_rs_files(path, filter)?); + let FileMapSearchResult { + map, + errors: child_errors, + } = find_rs_files(path, filter)?; + errors.extend(child_errors); + files.extend(map); } } } else if root.extension().and_then(|s| s.to_str()) == Some("rs") { if let Ok(mut file) = File::open(root.clone()) { let mut src = String::new(); - file.read_to_string(&mut src).expect("Unable to read file"); + file.read_to_string(&mut src)?; files.insert(root, (src, None)); } } - Ok(files) + Ok(FileMapSearchResult { map: files, errors }) } + let FileMapSearchResult { map, errors } = find_rs_files(path, &mut filter)?; let result = Self { - map: find_rs_files(path, &mut filter).unwrap(), + map, phantom: std::marker::PhantomData, }; - result + Ok(FileMapBuildResult { + map: result, + errors, + }) } /// Try to update the rsx in a file - pub fn update_rsx(&mut self, file_path: &Path, crate_dir: &Path) -> UpdateResult { - let mut file = File::open(file_path).unwrap(); + pub fn update_rsx(&mut self, file_path: &Path, crate_dir: &Path) -> io::Result { + let mut file = File::open(file_path)?; let mut src = String::new(); - file.read_to_string(&mut src).expect("Unable to read file"); + file.read_to_string(&mut src)?; if let Ok(syntax) = syn::parse_file(&src) { if let Some((old_src, template_slot)) = self.map.get_mut(file_path) { if let Ok(old) = syn::parse_file(old_src) { @@ -99,7 +124,7 @@ impl FileMap { { // dioxus cannot handle empty templates if template.roots.is_empty() { - return UpdateResult::NeedsRebuild; + return Ok(UpdateResult::NeedsRebuild); } else { // if the template is the same, don't send it if let Some(old_template) = template_slot { @@ -111,20 +136,25 @@ impl FileMap { messages.push(template); } } else { - return UpdateResult::NeedsRebuild; + return Ok(UpdateResult::NeedsRebuild); } } } } - return UpdateResult::UpdatedRsx(messages); + return Ok(UpdateResult::UpdatedRsx(messages)); } } } } else { // if this is a new file, rebuild the project - *self = FileMap::new(crate_dir.to_path_buf()); + let FileMapBuildResult { map, mut errors } = + FileMap::create(crate_dir.to_path_buf())?; + if let Some(err) = errors.pop() { + return Err(err); + } + *self = map; } } - UpdateResult::NeedsRebuild + Ok(UpdateResult::NeedsRebuild) } } From 9ac82101963e1aab9920495013ccee3ab62d2128 Mon Sep 17 00:00:00 2001 From: Jan-Mirko Otter Date: Wed, 22 Feb 2023 20:26:21 +0100 Subject: [PATCH 4/4] PartialEq for UseState/UseCoroutine --- packages/hooks/src/usecoroutine.rs | 6 ++++++ packages/hooks/src/usestate.rs | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/hooks/src/usecoroutine.rs b/packages/hooks/src/usecoroutine.rs index 2f2442f87..bc97735b9 100644 --- a/packages/hooks/src/usecoroutine.rs +++ b/packages/hooks/src/usecoroutine.rs @@ -108,6 +108,12 @@ impl Coroutine { } } +impl PartialEq for Coroutine { + fn eq(&self, other: &Self) -> bool { + self.task == other.task + } +} + #[cfg(test)] mod tests { #![allow(unused)] diff --git a/packages/hooks/src/usestate.rs b/packages/hooks/src/usestate.rs index 2e1aa7295..d2b6db6fc 100644 --- a/packages/hooks/src/usestate.rs +++ b/packages/hooks/src/usestate.rs @@ -329,7 +329,7 @@ impl PartialEq for &UseState { } } -impl PartialEq> for UseState { +impl PartialEq> for UseState { fn eq(&self, other: &UseState) -> bool { Rc::ptr_eq(&self.current_val, &other.current_val) }
TutorialTutorial Web Desktop SSR