feat: add profile flag

This commit is contained in:
YuKun Liu committed 2022-06-06 00:16:15 +08:00
1 parent 62d18441c7
commit 51639af482
5 files changed
+30

No files matched your search

+9
View File
@@ -114,6 +114,7 @@ pub struct CrateConfig {
pub executable: ExecutableType,
pub dioxus_config: DioxusConfig,
pub release: bool,
pub custom_profile: Option<String>,
}
#[derive(Debug, Clone)]
@@ -163,6 +164,8 @@ impl CrateConfig {
let release = false;
let custom_profile = None;
Ok(Self {
out_dir,
crate_dir,
@@ -173,6 +176,7 @@ impl CrateConfig {
executable,
release,
dioxus_config,
custom_profile,
})
}
@@ -186,6 +190,11 @@ impl CrateConfig {
self
}
pub fn set_profile(&mut self, profile: String) -> &mut Self {
self.custom_profile = Some(profile);
self
}
// pub fn with_build_options(&mut self, options: &BuildOptions) {
// if let Some(name) = &options.example {
// self.as_example(name.clone());