Simplify cli-config, hotreload -> devtools (drop to 0 deps, fast compile times) (#2975)
* simplify cli-config crate * clean up configs * add devtools crate, update cargo imports * fix serve addr, fix websocket proxy issue * add comment about opt profiles * rename hot-reload to devtools
This commit is contained in:
1 parent
8203ee571f
commit
3fb1f739d1
58 files changed
+1131
-1654
No files matched your search
@@ -0,0 +1,8 @@
|
||||
[package]
|
||||
name = "dioxus-devtools-types"
|
||||
edition = "2021"
|
||||
version.workspace = true
|
||||
|
||||
[dependencies]
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
dioxus-core = { workspace = true }
|
||||
@@ -0,0 +1,41 @@
|
||||
use dioxus_core::internal::HotReloadTemplateWithLocation;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::path::PathBuf;
|
||||
|
||||
/// A message the hot reloading server sends to the client
|
||||
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
|
||||
pub enum DevserverMsg {
|
||||
/// Attempt a hotreload
|
||||
/// This includes all the templates/literals/assets/binary patches that have changed in one shot
|
||||
HotReload(HotReloadMsg),
|
||||
|
||||
/// The devserver is starting a full rebuild.
|
||||
FullReloadStart,
|
||||
|
||||
/// The full reload failed.
|
||||
FullReloadFailed,
|
||||
|
||||
/// The app should reload completely if it can
|
||||
FullReloadCommand,
|
||||
|
||||
/// The program is shutting down completely - maybe toss up a splash screen or something?
|
||||
Shutdown,
|
||||
}
|
||||
|
||||
/// A message the client sends from the frontend to the devserver
|
||||
///
|
||||
/// This is used to communicate with the devserver
|
||||
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
|
||||
pub enum ClientMsg {
|
||||
Log {
|
||||
level: String,
|
||||
messages: Vec<String>,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
|
||||
pub struct HotReloadMsg {
|
||||
pub templates: Vec<HotReloadTemplateWithLocation>,
|
||||
pub assets: Vec<PathBuf>,
|
||||
pub unknown_files: Vec<PathBuf>,
|
||||
}
|
||||
Reference in new issue
Block a user