Add fullstack platform to serve and build commands
This commit is contained in:
1 parent
f652474a6e
commit
bd743fa2f9
7 files changed
+209
-49
No files matched your search
@@ -1,4 +1,4 @@
|
||||
use crate::{BuildResult, CrateConfig, Result};
|
||||
use crate::{cfg::ConfigOptsServe, BuildResult, CrateConfig, Result};
|
||||
|
||||
use cargo_metadata::diagnostic::Diagnostic;
|
||||
use dioxus_core::Template;
|
||||
@@ -14,6 +14,7 @@ use tokio::sync::broadcast::Sender;
|
||||
mod output;
|
||||
use output::*;
|
||||
pub mod desktop;
|
||||
pub mod fullstack;
|
||||
pub mod web;
|
||||
|
||||
/// Sets up a file watcher
|
||||
@@ -180,3 +181,10 @@ async fn setup_file_watcher_hot_reload<F: Fn() -> Result<BuildResult> + Send + '
|
||||
|
||||
Ok(watcher)
|
||||
}
|
||||
|
||||
pub(crate) trait Platform {
|
||||
fn start(config: &CrateConfig, serve: &ConfigOptsServe) -> Result<Self>
|
||||
where
|
||||
Self: Sized;
|
||||
fn rebuild(&mut self, config: &CrateConfig) -> Result<BuildResult>;
|
||||
}
|
||||
Reference in new issue
Block a user