Rename hot_reload to hot-reload

This commit is contained in:
YuKun Liu committed 2022-06-26 14:23:19 +08:00
1 parent 1c31fd0e22
commit 0af69f83f2
9 files changed
+13 -13

No files matched your search

+1 -1
View File
@@ -28,4 +28,4 @@ trybuild = "1.0"
[features]
default = []
hot_reload = ["dioxus-rsx-interpreter"]
hot-reload = ["dioxus-rsx-interpreter"]
+3 -3
View File
@@ -34,12 +34,12 @@ pub fn derive_typed_builder(input: proc_macro::TokenStream) -> proc_macro::Token
/// ```
#[proc_macro]
pub fn rsx(s: TokenStream) -> TokenStream {
#[cfg(feature = "hot_reload")]
#[cfg(feature = "hot-reload")]
let rsx_text = s.to_string();
match syn::parse::<rsx::CallBody>(s) {
Err(err) => err.to_compile_error().into(),
Ok(body) => {
#[cfg(feature = "hot_reload")]
#[cfg(feature = "hot-reload")]
{
use dioxus_rsx_interpreter::captuered_context::CapturedContextBuilder;
@@ -66,7 +66,7 @@ pub fn rsx(s: TokenStream) -> TokenStream {
Err(err) => err.into_compile_error().into(),
}
}
#[cfg(not(feature = "hot_reload"))]
#[cfg(not(feature = "hot-reload"))]
body.to_token_stream().into()
}
}
+1 -1
View File
@@ -44,7 +44,7 @@ tokio_runtime = ["tokio"]
fullscreen = ["wry/fullscreen"]
transparent = ["wry/transparent"]
tray = ["wry/tray"]
hot_reload = ["dioxus-rsx-interpreter", "interprocess"]
hot-reload = ["dioxus-rsx-interpreter", "interprocess"]
[dev-dependencies]
dioxus-core-macro = { path = "../core-macro" }
+1 -1
View File
@@ -51,7 +51,7 @@ impl DesktopController {
dom.base_scope().provide_context(window_context);
// allow other proccesses to send the new rsx text to the @dioxusin ipc channel and recieve erros on the @dioxusout channel
#[cfg(feature = "hot_reload")]
#[cfg(feature = "hot-reload")]
{
use dioxus_rsx_interpreter::{
error::Error, ErrorHandler, SetManyRsxMessage, RSX_CONTEXT,
+1 -1
View File
@@ -77,7 +77,7 @@ features = [
[features]
default = ["panic_hook"]
panic_hook = ["console_error_panic_hook"]
hot_reload = ["dioxus-rsx-interpreter", "web-sys/WebSocket", "web-sys/Location", "web-sys/MessageEvent", "web-sys/console", "serde_json"]
hot-reload = ["dioxus-rsx-interpreter", "web-sys/WebSocket", "web-sys/Location", "web-sys/MessageEvent", "web-sys/console", "serde_json"]
[dev-dependencies]
dioxus-core-macro = { path = "../core-macro" }
+1 -1
View File
@@ -217,7 +217,7 @@ pub async fn run_with_props<T: 'static + Send>(root: Component<T>, root_props: T
let mut work_loop = ric_raf::RafLoop::new();
#[cfg(feature = "hot_reload")]
#[cfg(feature = "hot-reload")]
{
use dioxus_rsx_interpreter::error::Error;
use dioxus_rsx_interpreter::{ErrorHandler, SetManyRsxMessage, RSX_CONTEXT};