mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-10 06:34:20 +00:00
set up example scaping for docs.rs (#2450)
This commit is contained in:
parent
afc1c7f31a
commit
b3cd4fac10
36 changed files with 372 additions and 29 deletions
7
Cargo.lock
generated
7
Cargo.lock
generated
|
@ -2299,18 +2299,23 @@ dependencies = [
|
||||||
"dioxus-hot-reload",
|
"dioxus-hot-reload",
|
||||||
"dioxus-html",
|
"dioxus-html",
|
||||||
"dioxus-interpreter-js",
|
"dioxus-interpreter-js",
|
||||||
|
"dioxus-ssr",
|
||||||
"dunce",
|
"dunce",
|
||||||
"exitcode",
|
"exitcode",
|
||||||
"futures-channel",
|
"futures-channel",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
"generational-box 0.5.2",
|
"generational-box 0.5.2",
|
||||||
"global-hotkey",
|
"global-hotkey",
|
||||||
|
"http-range",
|
||||||
"infer 0.11.0",
|
"infer 0.11.0",
|
||||||
"muda",
|
"muda",
|
||||||
"objc",
|
"objc",
|
||||||
"objc_id",
|
"objc_id",
|
||||||
|
"rand 0.8.5",
|
||||||
|
"reqwest",
|
||||||
"rfd",
|
"rfd",
|
||||||
"rustc-hash",
|
"rustc-hash",
|
||||||
|
"separator",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"signal-hook",
|
"signal-hook",
|
||||||
|
@ -2577,6 +2582,8 @@ name = "dioxus-router"
|
||||||
version = "0.5.2"
|
version = "0.5.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"axum",
|
"axum",
|
||||||
|
"base64 0.21.7",
|
||||||
|
"ciborium",
|
||||||
"console_error_panic_hook",
|
"console_error_panic_hook",
|
||||||
"criterion 0.5.1",
|
"criterion 0.5.1",
|
||||||
"dioxus",
|
"dioxus",
|
||||||
|
|
119
Cargo.toml
119
Cargo.toml
|
@ -118,9 +118,6 @@ axum-extra = "0.9.2"
|
||||||
reqwest = "0.11.24"
|
reqwest = "0.11.24"
|
||||||
owo-colors = "4.0.0"
|
owo-colors = "4.0.0"
|
||||||
|
|
||||||
[workspace.dev-dependencies]
|
|
||||||
isnta = "1.36.1"
|
|
||||||
|
|
||||||
# speed up some macros by optimizing them
|
# speed up some macros by optimizing them
|
||||||
[profile.dev.package.insta]
|
[profile.dev.package.insta]
|
||||||
opt-level = 3
|
opt-level = 3
|
||||||
|
@ -199,27 +196,139 @@ http = ["reqwest", "http-range"]
|
||||||
[[example]]
|
[[example]]
|
||||||
name = "login_form"
|
name = "login_form"
|
||||||
required-features = ["http"]
|
required-features = ["http"]
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
[[example]]
|
[[example]]
|
||||||
name = "dog_app"
|
name = "dog_app"
|
||||||
required-features = ["http"]
|
required-features = ["http"]
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
[[example]]
|
[[example]]
|
||||||
name = "video_stream"
|
name = "video_stream"
|
||||||
required-features = ["http"]
|
required-features = ["http", "desktop"]
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
[[example]]
|
[[example]]
|
||||||
name = "suspense"
|
name = "suspense"
|
||||||
required-features = ["http"]
|
required-features = ["http", "desktop"]
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
[[example]]
|
[[example]]
|
||||||
name = "weather_app"
|
name = "weather_app"
|
||||||
required-features = ["http"]
|
required-features = ["http"]
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
[[example]]
|
[[example]]
|
||||||
name = "image_generator_openai"
|
name = "image_generator_openai"
|
||||||
required-features = ["http"]
|
required-features = ["http"]
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
[[example]]
|
[[example]]
|
||||||
name = "hash_fragment_state"
|
name = "hash_fragment_state"
|
||||||
required-features = ["ciborium", "base64"]
|
required-features = ["ciborium", "base64"]
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "backgrounded_futures"
|
||||||
|
required-features = ["desktop"]
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "calculator_mutable"
|
||||||
|
required-features = ["desktop"]
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "calculator"
|
||||||
|
required-features = ["desktop"]
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "clock"
|
||||||
|
required-features = ["desktop"]
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "crm"
|
||||||
|
required-features = ["desktop"]
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "custom_html"
|
||||||
|
required-features = ["desktop"]
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "custom_menu"
|
||||||
|
required-features = ["desktop"]
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "dynamic_asset"
|
||||||
|
required-features = ["desktop"]
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "error_handle"
|
||||||
|
required-features = ["desktop"]
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "file_explorer"
|
||||||
|
required-features = ["desktop"]
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "future"
|
||||||
|
required-features = ["desktop"]
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "hydration"
|
||||||
|
required-features = ["desktop"]
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "multiwindow"
|
||||||
|
required-features = ["desktop"]
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "overlay"
|
||||||
|
required-features = ["desktop"]
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "popup"
|
||||||
|
required-features = ["desktop"]
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "read_size"
|
||||||
|
required-features = ["desktop"]
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "shortcut"
|
||||||
|
required-features = ["desktop"]
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "streams"
|
||||||
|
required-features = ["desktop"]
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "window_event"
|
||||||
|
required-features = ["desktop"]
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "window_focus"
|
||||||
|
required-features = ["desktop"]
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "window_zoom"
|
||||||
|
required-features = ["desktop"]
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
|
@ -7,7 +7,7 @@ use dioxus::prelude::*;
|
||||||
use std::fmt::Display;
|
use std::fmt::Display;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
launch_desktop(app);
|
launch(app);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn app() -> Element {
|
fn app() -> Element {
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
use dioxus::prelude::*;
|
use dioxus::prelude::*;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
launch_desktop(app);
|
launch(app);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn app() -> Element {
|
fn app() -> Element {
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
use dioxus::prelude::*;
|
use dioxus::prelude::*;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
launch_desktop(app);
|
launch(app);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn app() -> Element {
|
fn app() -> Element {
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
use dioxus::prelude::*;
|
use dioxus::prelude::*;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
launch_desktop(app);
|
launch(app);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn app() -> Element {
|
fn app() -> Element {
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
use dioxus::prelude::*;
|
use dioxus::prelude::*;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
launch_desktop(app);
|
launch(app);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn app() -> Element {
|
fn app() -> Element {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
use dioxus::prelude::*;
|
use dioxus::prelude::*;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
launch_desktop(app);
|
launch(app);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn app() -> Element {
|
fn app() -> Element {
|
||||||
|
|
|
@ -10,7 +10,7 @@ use dioxus::prelude::*;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
launch_desktop(app);
|
launch(app);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn app() -> Element {
|
fn app() -> Element {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
use dioxus::prelude::*;
|
use dioxus::prelude::*;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
launch_desktop(app);
|
launch(app);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn app() -> Element {
|
fn app() -> Element {
|
||||||
|
|
|
@ -25,3 +25,6 @@ prettyplease = { workspace = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
pretty_assertions = "1.2.1"
|
pretty_assertions = "1.2.1"
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
|
||||||
|
|
|
@ -159,11 +159,11 @@ impl Display for IssueReport {
|
||||||
#[allow(clippy::enum_variant_names)] // we'll add non-hook ones in the future
|
#[allow(clippy::enum_variant_names)] // we'll add non-hook ones in the future
|
||||||
/// Issues that might be found via static analysis of a Dioxus file.
|
/// Issues that might be found via static analysis of a Dioxus file.
|
||||||
pub enum Issue {
|
pub enum Issue {
|
||||||
/// https://dioxuslabs.com/learn/0.5/reference/hooks#no-hooks-in-conditionals
|
/// <https://dioxuslabs.com/learn/0.5/reference/hooks#no-hooks-in-conditionals>
|
||||||
HookInsideConditional(HookInfo, ConditionalInfo),
|
HookInsideConditional(HookInfo, ConditionalInfo),
|
||||||
/// https://dioxuslabs.com/learn/0.5/reference/hooks#no-hooks-in-loops
|
/// <https://dioxuslabs.com/learn/0.5/reference/hooks#no-hooks-in-loops>
|
||||||
HookInsideLoop(HookInfo, AnyLoopInfo),
|
HookInsideLoop(HookInfo, AnyLoopInfo),
|
||||||
/// https://dioxuslabs.com/learn/0.5/reference/hooks#no-hooks-in-closures
|
/// <https://dioxuslabs.com/learn/0.5/reference/hooks#no-hooks-in-closures>
|
||||||
HookInsideClosure(HookInfo, ClosureInfo),
|
HookInsideClosure(HookInfo, ClosureInfo),
|
||||||
HookOutsideComponent(HookInfo),
|
HookOutsideComponent(HookInfo),
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,3 +25,6 @@ tauri-utils = { version = "=1.5.*", optional = true }
|
||||||
default = ["read-config"]
|
default = ["read-config"]
|
||||||
cli = ["tauri-bundler", "tauri-utils", "clap", "toml", "cargo_toml"]
|
cli = ["tauri-bundler", "tauri-utils", "clap", "toml", "cargo_toml"]
|
||||||
read-config = []
|
read-config = []
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
|
||||||
|
|
|
@ -25,3 +25,6 @@ mobile = []
|
||||||
web = []
|
web = []
|
||||||
ssr = []
|
ssr = []
|
||||||
liveview = []
|
liveview = []
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
|
||||||
|
|
|
@ -29,3 +29,6 @@ trybuild = "1.0"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
|
||||||
|
|
|
@ -35,3 +35,6 @@ reqwest = { workspace = true}
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
serialize = ["serde"]
|
serialize = ["serde"]
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
|
||||||
|
|
|
@ -81,10 +81,16 @@ gnu = []
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
default-features = false
|
default-features = false
|
||||||
features = ["tokio_runtime", "hot-reload"]
|
features = ["tokio_runtime", "hot-reload"]
|
||||||
|
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
dioxus = { workspace = true, features = ["desktop"] }
|
dioxus = { workspace = true, features = ["desktop"] }
|
||||||
exitcode = "1.1.2"
|
exitcode = "1.1.2"
|
||||||
|
reqwest = { version = "0.11.9", features = ["json"] }
|
||||||
|
http-range = { version = "0.1.5" }
|
||||||
|
dioxus-ssr = { workspace = true, version = "0.5.0", default-features = false }
|
||||||
|
separator = "0.4.1"
|
||||||
|
rand = { version = "0.8.4", features = ["small_rng"] }
|
||||||
|
|
||||||
# These tests need to be run on the main thread, so they cannot use rust's test harness.
|
# These tests need to be run on the main thread, so they cannot use rust's test harness.
|
||||||
[[test]]
|
[[test]]
|
||||||
|
@ -101,3 +107,114 @@ harness = false
|
||||||
name = "check_eval"
|
name = "check_eval"
|
||||||
path = "headless_tests/eval.rs"
|
path = "headless_tests/eval.rs"
|
||||||
harness = false
|
harness = false
|
||||||
|
|
||||||
|
# Most of the examples live in the workspace. We include some here so that docs.rs can scrape our examples for better inline docs
|
||||||
|
[[example]]
|
||||||
|
name = "video_stream"
|
||||||
|
path = "../../examples/video_stream.rs"
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "suspense"
|
||||||
|
path = "../../examples/suspense.rs"
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "calculator_mutable"
|
||||||
|
path = "../../examples/calculator_mutable.rs"
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "calculator"
|
||||||
|
path = "../../examples/calculator.rs"
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "clock"
|
||||||
|
path = "../../examples/clock.rs"
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "crm"
|
||||||
|
path = "../../examples/crm.rs"
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "custom_html"
|
||||||
|
path = "../../examples/custom_html.rs"
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "custom_menu"
|
||||||
|
path = "../../examples/custom_menu.rs"
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "dynamic_asset"
|
||||||
|
path = "../../examples/dynamic_asset.rs"
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "error_handle"
|
||||||
|
path = "../../examples/error_handle.rs"
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "file_explorer"
|
||||||
|
path = "../../examples/file_explorer.rs"
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "future"
|
||||||
|
path = "../../examples/future.rs"
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "hydration"
|
||||||
|
path = "../../examples/hydration.rs"
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "multiwindow"
|
||||||
|
path = "../../examples/multiwindow.rs"
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "overlay"
|
||||||
|
path = "../../examples/overlay.rs"
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "popup"
|
||||||
|
path = "../../examples/popup.rs"
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "read_size"
|
||||||
|
path = "../../examples/read_size.rs"
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "shortcut"
|
||||||
|
path = "../../examples/shortcut.rs"
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "streams"
|
||||||
|
path = "../../examples/streams.rs"
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "window_event"
|
||||||
|
path = "../../examples/window_event.rs"
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "window_focus"
|
||||||
|
path = "../../examples/window_focus.rs"
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "window_zoom"
|
||||||
|
path = "../../examples/window_zoom.rs"
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
|
@ -25,6 +25,9 @@ dioxus = { workspace = true }
|
||||||
[features]
|
[features]
|
||||||
default = ["macro", "html", "signals", "hooks"]
|
default = ["macro", "html", "signals", "hooks"]
|
||||||
signals = ["dioxus-signals"]
|
signals = ["dioxus-signals"]
|
||||||
macro = ["dioxus-core-macro", "dioxus-rsx"]
|
macro = ["dioxus-core-macro", "dioxus-rsx", "dioxus-config-macro"]
|
||||||
html = ["dioxus-html"]
|
html = ["dioxus-html"]
|
||||||
hooks = ["dioxus-hooks"]
|
hooks = ["dioxus-hooks"]
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
|
||||||
|
|
|
@ -35,7 +35,7 @@ pub mod prelude {
|
||||||
#[allow(deprecated)]
|
#[allow(deprecated)]
|
||||||
pub use dioxus_core_macro::{component, format_args_f, inline_props, render, rsx, Props};
|
pub use dioxus_core_macro::{component, format_args_f, inline_props, render, rsx, Props};
|
||||||
|
|
||||||
#[cfg(feature = "launch")]
|
#[cfg(feature = "macro")]
|
||||||
pub use dioxus_config_macro::*;
|
pub use dioxus_config_macro::*;
|
||||||
|
|
||||||
#[cfg(feature = "html")]
|
#[cfg(feature = "html")]
|
||||||
|
|
|
@ -67,3 +67,6 @@ tokio = { workspace = true, features = ["full"] }
|
||||||
[[bench]]
|
[[bench]]
|
||||||
name = "jsframework"
|
name = "jsframework"
|
||||||
harness = false
|
harness = false
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
|
||||||
|
|
|
@ -96,3 +96,7 @@ server = [
|
||||||
"thiserror",
|
"thiserror",
|
||||||
"dioxus-cli-config"
|
"dioxus-cli-config"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
|
||||||
|
features = ["axum", "web"]
|
||||||
|
|
|
@ -25,3 +25,6 @@ debug_ownership = []
|
||||||
[[bench]]
|
[[bench]]
|
||||||
name = "lock"
|
name = "lock"
|
||||||
harness = false
|
harness = false
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
|
||||||
|
|
|
@ -30,3 +30,6 @@ dioxus-core = { workspace = true }
|
||||||
dioxus = { workspace = true }
|
dioxus = { workspace = true }
|
||||||
web-sys = { version = "0.3.64", features = ["Document", "Window", "Element"] }
|
web-sys = { version = "0.3.64", features = ["Document", "Window", "Element"] }
|
||||||
tokio = { version = "1.0", features = ["full"] }
|
tokio = { version = "1.0", features = ["full"] }
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
|
||||||
|
|
|
@ -38,3 +38,6 @@ default = ["dioxus-html"]
|
||||||
custom_file_watcher = ["ignore", "chrono", "notify", "execute", "once_cell", "ignore"]
|
custom_file_watcher = ["ignore", "chrono", "notify", "execute", "once_cell", "ignore"]
|
||||||
file_watcher = ["custom_file_watcher", "dioxus-html/hot-reload-context"]
|
file_watcher = ["custom_file_watcher", "dioxus-html/hot-reload-context"]
|
||||||
serve = ["axum", "tokio-stream", "futures-util", "tokio", "file_watcher"]
|
serve = ["axum", "tokio-stream", "futures-util", "tokio", "file_watcher"]
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
|
||||||
|
|
|
@ -78,3 +78,7 @@ wasm-bind = ["web-sys", "wasm-bindgen"]
|
||||||
native-bind = ["tokio"]
|
native-bind = ["tokio"]
|
||||||
hot-reload-context = ["dioxus-rsx"]
|
hot-reload-context = ["dioxus-rsx"]
|
||||||
html-to-rsx = []
|
html-to-rsx = []
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
|
||||||
|
feature = ["html-to-rsx", "hot-reload-context", "html-to-rsx", "native-bind", "wasm-bind"]
|
||||||
|
|
|
@ -49,7 +49,9 @@ hot-reload = ["dioxus-hot-reload"]
|
||||||
[[example]]
|
[[example]]
|
||||||
name = "axum"
|
name = "axum"
|
||||||
required-features = ["axum"]
|
required-features = ["axum"]
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
[[example]]
|
[[example]]
|
||||||
name = "axum_stress"
|
name = "axum_stress"
|
||||||
required-features = ["axum"]
|
required-features = ["axum"]
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
|
@ -16,3 +16,6 @@ dioxus-desktop = { workspace = true, features = ["tokio_runtime"] }
|
||||||
doctest = false
|
doctest = false
|
||||||
# tests suspended until package ready
|
# tests suspended until package ready
|
||||||
test = false
|
test = false
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
|
||||||
|
|
|
@ -26,3 +26,6 @@ dioxus = { workspace = true, features = ["router"] }
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
web = []
|
web = []
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
|
||||||
|
|
|
@ -31,6 +31,15 @@ dioxus-fullstack = { workspace = true, optional = true }
|
||||||
tokio = { workspace = true, features = ["full"], optional = true }
|
tokio = { workspace = true, features = ["full"], optional = true }
|
||||||
dioxus-cli-config = { workspace = true, features = ["read-config"] }
|
dioxus-cli-config = { workspace = true, features = ["read-config"] }
|
||||||
|
|
||||||
|
# you need to comment this out when publishing since cargo workspaces is not smart enough to wipe this when dropping
|
||||||
|
# dev-dependncey crates
|
||||||
|
[target.'cfg(target_family = "wasm")'.dev-dependencies]
|
||||||
|
console_error_panic_hook = "0.1.7"
|
||||||
|
dioxus-router = { workspace = true, features = ["web"] }
|
||||||
|
# dioxus-web = { workspace = true }
|
||||||
|
gloo = "0.8.0"
|
||||||
|
wasm-bindgen-test = "0.3.33"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
ssr = ["dioxus-ssr/incremental", "tokio", "dioxus-fullstack?/server", "http"]
|
ssr = ["dioxus-ssr/incremental", "tokio", "dioxus-fullstack?/server", "http"]
|
||||||
|
@ -44,21 +53,55 @@ axum = { workspace = true, features = ["ws"] }
|
||||||
dioxus = { workspace = true, features = ["router"] }
|
dioxus = { workspace = true, features = ["router"] }
|
||||||
dioxus-ssr = { workspace = true }
|
dioxus-ssr = { workspace = true }
|
||||||
criterion = { version = "0.5", features = ["async_tokio", "html_reports"] }
|
criterion = { version = "0.5", features = ["async_tokio", "html_reports"] }
|
||||||
|
ciborium = { version = "0.2.1" }
|
||||||
|
base64 = { version = "0.21.0" }
|
||||||
|
serde = { version = "1", features = ["derive"] }
|
||||||
|
|
||||||
[[example]]
|
[package.metadata.docs.rs]
|
||||||
name = "static_generation"
|
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
|
||||||
required-features = ["ssr"]
|
|
||||||
|
|
||||||
[[bench]]
|
[[bench]]
|
||||||
name = "incremental"
|
name = "incremental"
|
||||||
required-features = ["ssr"]
|
required-features = ["ssr"]
|
||||||
harness = false
|
harness = false
|
||||||
|
|
||||||
# you need to comment this out when publishing since cargo workspaces is not smart enough to wipe this when dropping
|
# Most of the examples live in the workspace. We include some here so that docs.rs can scrape our examples for better inline docs
|
||||||
# dev-dependncey crates
|
[[example]]
|
||||||
[target.'cfg(target_family = "wasm")'.dev-dependencies]
|
name = "crm"
|
||||||
console_error_panic_hook = "0.1.7"
|
path = "../../examples/crm.rs"
|
||||||
dioxus-router = { workspace = true, features = ["web"] }
|
doc-scrape-examples = true
|
||||||
# dioxus-web = { workspace = true }
|
|
||||||
gloo = "0.8.0"
|
[[example]]
|
||||||
wasm-bindgen-test = "0.3.33"
|
name = "flat_router"
|
||||||
|
path = "../../examples/flat_router.rs"
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "hash_fragment_state"
|
||||||
|
path = "../../examples/hash_fragment_state.rs"
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "link"
|
||||||
|
path = "../../examples/link.rs"
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "query_segment_search"
|
||||||
|
path = "../../examples/query_segment_search.rs"
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "router"
|
||||||
|
path = "../../examples/router.rs"
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "simple_router"
|
||||||
|
path = "../../examples/simple_router.rs"
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "static_generation"
|
||||||
|
required-features = ["ssr"]
|
||||||
|
doc-scrape-examples = true
|
||||||
|
|
|
@ -29,3 +29,6 @@ convert_case = "0.5.0"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
pretty_assertions = "1.2.1"
|
pretty_assertions = "1.2.1"
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
|
||||||
|
|
|
@ -31,3 +31,6 @@ html = []
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
insta = "1.36.1"
|
insta = "1.36.1"
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
|
||||||
|
|
|
@ -26,3 +26,6 @@ proc-macro = true
|
||||||
axum = ["server_fn_macro/axum"]
|
axum = ["server_fn_macro/axum"]
|
||||||
server = ["server_fn_macro/ssr"]
|
server = ["server_fn_macro/ssr"]
|
||||||
reqwest = ["server_fn_macro/reqwest"]
|
reqwest = ["server_fn_macro/reqwest"]
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
|
||||||
|
|
|
@ -32,3 +32,6 @@ simple_logger = "4.2.0"
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
serialize = ["serde"]
|
serialize = ["serde"]
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
|
||||||
|
|
|
@ -44,3 +44,6 @@ fs_extra = "1.2.0"
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
incremental = ["dep:tokio", "chrono", "dioxus-cli-config"]
|
incremental = ["dep:tokio", "chrono", "dioxus-cli-config"]
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
|
||||||
|
|
|
@ -32,3 +32,6 @@ dioxus = { workspace = true }
|
||||||
default = []
|
default = []
|
||||||
server = ["dioxus-fullstack/server", "dioxus-router/ssr", "dioxus-ssr", "tokio", "http", "dep:axum", "tower-http", "dioxus-hot-reload", "dioxus-cli-config", "tower"]
|
server = ["dioxus-fullstack/server", "dioxus-router/ssr", "dioxus-ssr", "tokio", "http", "dep:axum", "tower-http", "dioxus-hot-reload", "dioxus-cli-config", "tower"]
|
||||||
web = ["dioxus-fullstack/web", "dioxus-router/web", "dioxus-web"]
|
web = ["dioxus-fullstack/web", "dioxus-router/web", "dioxus-web"]
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
|
||||||
|
|
|
@ -73,3 +73,6 @@ gloo-timers = "0.2.3"
|
||||||
gloo-dialogs = "0.1.1"
|
gloo-dialogs = "0.1.1"
|
||||||
dioxus-web = { path = ".", features = ["hydrate"] }
|
dioxus-web = { path = ".", features = ["hydrate"] }
|
||||||
tracing-wasm = "0.2.1"
|
tracing-wasm = "0.2.1"
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
|
||||||
|
|
Loading…
Reference in a new issue