浏览代码

fix dependancies

Evan Almloff 2 年之前
父节点
当前提交
0c6750d177
共有 4 个文件被更改,包括 10 次插入14 次删除
  1. 2 3
      packages/desktop/Cargo.toml
  2. 2 2
      packages/liveview/Cargo.toml
  3. 2 5
      packages/tui/Cargo.toml
  4. 4 4
      packages/tui/src/lib.rs

+ 2 - 3
packages/desktop/Cargo.toml

@@ -15,7 +15,7 @@ keywords = ["dom", "ui", "gui", "react"]
 dioxus-core = { path = "../core", version = "^0.3.0", features = ["serialize"] }
 dioxus-html = { path = "../html", features = ["serialize"], version = "^0.3.0" }
 dioxus-interpreter-js = { path = "../interpreter", version = "^0.3.0" }
-dioxus-hot-reload = { path = "../hot-reload" }
+dioxus-hot-reload = { path = "../hot-reload", optional = true }
 
 serde = "1.0.136"
 serde_json = "1.0.79"
@@ -34,7 +34,6 @@ webbrowser = "0.8.0"
 infer = "0.11.0"
 dunce = "1.0.2"
 
-interprocess = { version = "1.2.1", optional = true }
 futures-util = "0.3.25"
 
 [target.'cfg(target_os = "ios")'.dependencies]
@@ -50,7 +49,7 @@ tokio_runtime = ["tokio"]
 fullscreen = ["wry/fullscreen"]
 transparent = ["wry/transparent"]
 tray = ["wry/tray"]
-hot-reload = ["interprocess"]
+hot-reload = ["dioxus-hot-reload"]
 
 [dev-dependencies]
 dioxus-core-macro = { path = "../core-macro" }

+ 2 - 2
packages/liveview/Cargo.toml

@@ -26,7 +26,7 @@ serde_json = "1.0.91"
 dioxus-html = { path = "../html", features = ["serialize"], version = "^0.3.0" }
 dioxus-core = { path = "../core", features = ["serialize"], version = "^0.3.0" }
 dioxus-interpreter-js = { path = "../interpreter", version = "0.3.0" }
-dioxus-hot-reload = { path = "../hot-reload" }
+dioxus-hot-reload = { path = "../hot-reload", optional = true }
 
 # warp
 warp = { version = "0.3.3", optional = true }
@@ -54,7 +54,7 @@ tower = "0.4.13"
 [features]
 default = ["hot-reload"]
 # actix = ["actix-files", "actix-web", "actix-ws"]
-hot-reload = ["interprocess"]
+hot-reload = ["dioxus-hot-reload"]
 
 [[example]]
 name = "axum"

+ 2 - 5
packages/tui/Cargo.toml

@@ -18,7 +18,7 @@ dioxus-core = { path = "../core", version = "^0.3.0", features = ["serialize"] }
 dioxus-html = { path = "../html", version = "^0.3.0" }
 dioxus-native-core = { path = "../native-core", version = "^0.2.0" }
 dioxus-native-core-macro = { path = "../native-core-macro", version = "^0.2.0" }
-dioxus-hot-reload = { path = "../hot-reload" }
+dioxus-hot-reload = { path = "../hot-reload", optional = true }
 
 tui = "0.17.0"
 crossterm = "0.23.0"
@@ -30,9 +30,6 @@ smallvec = "1.6"
 rustc-hash = "1.1.0"
 anymap = "1.0.0-beta.2"
 futures-channel = "0.3.25"
-interprocess = { version = "1.2.1", optional = true }
-serde = { version = "1.0.136", optional = true }
-serde_json = { version = "1.0.79", optional = true }
 
 [dev-dependencies]
 dioxus = { path = "../dioxus" }
@@ -45,4 +42,4 @@ harness = false
 
 [features]
 default = ["hot-reload"]
-hot-reload = ["interprocess", "serde", "serde_json"]
+hot-reload = ["dioxus-hot-reload"]

+ 4 - 4
packages/tui/src/lib.rs

@@ -6,7 +6,6 @@ use crossterm::{
     terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
 };
 use dioxus_core::*;
-use dioxus_hot_reload::HotReloadMsg;
 use dioxus_native_core::{real_dom::RealDom, FxDashSet, NodeId, NodeMask, SendAnyMap};
 use focus::FocusState;
 use futures::{
@@ -148,7 +147,8 @@ fn render_vdom(
         .block_on(async {
             #[cfg(all(feature = "hot-reload", debug_assertions))]
             let mut hot_reload_rx = {
-                let (hot_reload_tx, hot_reload_rx) = unbounded_channel::<HotReloadMsg>();
+                let (hot_reload_tx, hot_reload_rx) =
+                    unbounded_channel::<dioxus_hot_reload::HotReloadMsg>();
                 dioxus_hot_reload::connect(move |msg| {
                     let _ = hot_reload_tx.send(msg);
                 });
@@ -277,10 +277,10 @@ fn render_vdom(
                 // if we have a new template, replace the old one
                 if let Some(msg) = hot_reload_msg {
                     match msg {
-                        HotReloadMsg::UpdateTemplate(template) => {
+                        dioxus_hot_reload::HotReloadMsg::UpdateTemplate(template) => {
                             vdom.replace_template(template);
                         }
-                        HotReloadMsg::Shutdown => {
+                        dioxus_hot_reload::HotReloadMsg::Shutdown => {
                             break;
                         }
                     }