Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Reexport the Warning trait in dioxus-signals #3321

Merged
merged 2 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion packages/dioxus-lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,18 @@ dioxus-config-macro = { workspace = true, optional = true }
dioxus-hooks = { workspace = true, optional = true }
dioxus-rsx = { workspace = true, optional = true }
dioxus-signals = { workspace = true, optional = true }
warnings = { workspace = true, optional = true }

[dev-dependencies]
dioxus = { workspace = true }

[features]
default = ["macro", "html", "signals", "hooks"]
default = ["macro", "html", "signals", "hooks", "warnings"]
signals = ["dep:dioxus-signals"]
macro = ["dep:dioxus-core-macro", "dep:dioxus-rsx", "dep:dioxus-config-macro"]
html = ["dep:dioxus-html", "dep:dioxus-document", "dep:dioxus-history"]
hooks = ["dep:dioxus-hooks"]
warnings = ["dep:warnings"]

[package.metadata.docs.rs]
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
3 changes: 3 additions & 0 deletions packages/dioxus-lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ pub use dioxus_rsx as rsx;
#[cfg(feature = "macro")]
pub use dioxus_core_macro as core_macro;

#[cfg(feature = "warnings")]
pub use warnings;

pub mod prelude {
#[cfg(feature = "html")]
#[cfg_attr(docsrs, doc(cfg(feature = "html")))]
Expand Down
7 changes: 5 additions & 2 deletions packages/dioxus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ dioxus-liveview = { workspace = true, optional = true }
dioxus-ssr = { workspace = true, optional = true }
manganis = { workspace = true, features = ["dioxus"], optional = true }
dioxus-logger = { workspace = true, optional = true }
warnings = { workspace = true, optional = true }

serde = { workspace = true, optional = true }
dioxus-cli-config = { workspace = true, optional = true }
Expand All @@ -36,7 +37,7 @@ dioxus-cli-config = { workspace = true, optional = true }
dioxus-devtools = { workspace = true, optional = true }

[features]
default = ["macro", "html", "signals", "hooks", "launch", "mounted", "file_engine", "document", "asset", "devtools", "logger"]
default = ["macro", "html", "signals", "hooks", "launch", "mounted", "file_engine", "document", "asset", "devtools", "logger", "warnings"]
minimal = ["macro", "html", "signals", "hooks", "launch"]
signals = ["dep:dioxus-signals"]
macro = ["dep:dioxus-core-macro"]
Expand All @@ -48,6 +49,7 @@ file_engine = ["dioxus-web?/file_engine"]
asset = ["dep:manganis"]
document = ["dioxus-web?/document", "dep:dioxus-document", "dep:dioxus-history"]
logger = ["dep:dioxus-logger"]
warnings = ["dep:warnings"]

launch = ["dep:dioxus-config-macro"]
router = ["dep:dioxus-router"]
Expand Down Expand Up @@ -89,7 +91,8 @@ features = [
"hooks",
"html",
"liveview",
"server"
"server",
"warnings"
]
targets = [
"wasm32-unknown-unknown",
Expand Down
4 changes: 4 additions & 0 deletions packages/dioxus/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,7 @@ pub use dioxus_liveview as liveview;
#[cfg(feature = "ssr")]
#[cfg_attr(docsrs, doc(cfg(feature = "ssr")))]
pub use dioxus_ssr as ssr;

#[cfg(feature = "warnings")]
#[cfg_attr(docsrs, doc(cfg(feature = "warnings")))]
pub use warnings;
Loading