Add liveview support to the CLI and make fullstack runnable from dist (#2759)
* add liveview cli support * Fix TUI fullstack deadlock * look for fullstack assets in the public directory * Fix fullstack with the CLI * Fix static generation server
This commit is contained in:
1 parent
9dbdf74a1e
commit
e5e578d27b
14 files changed
+428
-272
No files matched your search
@@ -30,6 +30,11 @@ pub enum Platform {
|
||||
#[cfg_attr(feature = "cli", clap(name = "static-generation"))]
|
||||
#[serde(rename = "static-generation")]
|
||||
StaticGeneration,
|
||||
|
||||
/// Targeting the static generation platform using SSR and Dioxus-Fullstack
|
||||
#[cfg_attr(feature = "cli", clap(name = "liveview"))]
|
||||
#[serde(rename = "liveview")]
|
||||
Liveview,
|
||||
}
|
||||
|
||||
/// An error that occurs when a platform is not recognized
|
||||
@@ -50,6 +55,7 @@ impl FromStr for Platform {
|
||||
"desktop" => Ok(Self::Desktop),
|
||||
"fullstack" => Ok(Self::Fullstack),
|
||||
"static-generation" => Ok(Self::StaticGeneration),
|
||||
"liveview" => Ok(Self::Liveview),
|
||||
_ => Err(UnknownPlatformError),
|
||||
}
|
||||
}
|
||||
@@ -78,6 +84,7 @@ impl Platform {
|
||||
Platform::Desktop => "desktop",
|
||||
Platform::Fullstack => "fullstack",
|
||||
Platform::StaticGeneration => "static-generation",
|
||||
Platform::Liveview => "liveview",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user