use cli flag instead of feature flag
This commit is contained in:
1 parent
712d258496
commit
fb7ea5915b
6 files changed
+34
-18
No files matched your search
@@ -114,6 +114,7 @@ pub struct CrateConfig {
|
||||
pub executable: ExecutableType,
|
||||
pub dioxus_config: DioxusConfig,
|
||||
pub release: bool,
|
||||
pub hot_reload: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
@@ -162,6 +163,7 @@ impl CrateConfig {
|
||||
let executable = ExecutableType::Binary(output_filename);
|
||||
|
||||
let release = false;
|
||||
let hot_reload = false;
|
||||
|
||||
Ok(Self {
|
||||
out_dir,
|
||||
@@ -173,6 +175,7 @@ impl CrateConfig {
|
||||
executable,
|
||||
release,
|
||||
dioxus_config,
|
||||
hot_reload,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -186,6 +189,11 @@ impl CrateConfig {
|
||||
self
|
||||
}
|
||||
|
||||
pub fn with_hot_reload(&mut self, hot_reload: bool) -> &mut Self {
|
||||
self.hot_reload = hot_reload;
|
||||
self
|
||||
}
|
||||
|
||||
// pub fn with_build_options(&mut self, options: &BuildOptions) {
|
||||
// if let Some(name) = &options.example {
|
||||
// self.as_example(name.clone());
|
||||
|
||||
Reference in new issue
Block a user