feat: commit lua code

This commit is contained in:
mrxiaozhuox committed 2022-07-25 08:10:06 +08:00
1 parent ca8855b168
commit bd2853a194
7 files changed
+135 -37

No files matched your search

+7 -16
View File
@@ -1,4 +1,4 @@
use crate::error::Result;
use crate::{error::Result, plugin::PluginConfig};
use serde::{Deserialize, Serialize};
use std::{collections::HashMap, fs::File, io::Read, path::PathBuf};
@@ -34,7 +34,10 @@ impl Default for DioxusConfig {
default_platform: "web".to_string(),
out_dir: Some(PathBuf::from("dist")),
asset_dir: Some(PathBuf::from("public")),
tools: None,
plugins: None,
sub_package: None,
},
web: WebConfig {
@@ -66,7 +69,10 @@ pub struct ApplicationConfig {
pub default_platform: String,
pub out_dir: Option<PathBuf>,
pub asset_dir: Option<PathBuf>,
pub tools: Option<HashMap<String, toml::Value>>,
pub plugins: Option<PluginConfig>,
pub sub_package: Option<String>,
}
@@ -218,19 +224,4 @@ impl CrateConfig {
self
}
// pub fn with_build_options(&mut self, options: &BuildOptions) {
// if let Some(name) = &options.example {
// self.as_example(name.clone());
// }
// self.release = options.release;
// self.out_dir = options.outdir.clone().into();
// }
// pub fn with_develop_options(&mut self, options: &DevelopOptions) {
// if let Some(name) = &options.example {
// self.as_example(name.clone());
// }
// self.release = options.release;
// self.out_dir = tempfile::Builder::new().tempdir().expect("").into_path();
// }
}