feat: commit code

This commit is contained in:
mrxiaozhuox committed 2022-03-15 18:28:19 +08:00
1 parent 62a2292c16
commit 8b380f2617
1 file changed
+5 -4
+5 -4
View File
@@ -105,10 +105,6 @@ pub fn build(config: &CrateConfig) -> Result<()> {
let binaryen = crate::tools::Tool::Binaryen; let binaryen = crate::tools::Tool::Binaryen;
if !binaryen.is_installed() { if !binaryen.is_installed() {
log::error!("Binaryen tool not found, you can use `dioxus tool add binaryen` to install it.");
return Ok(());
}
if let Some(sub) = info.as_table() { if let Some(sub) = info.as_table() {
if sub.contains_key("wasm_opt") if sub.contains_key("wasm_opt")
&& sub.get("wasm_opt").unwrap().as_bool().unwrap_or(false) && sub.get("wasm_opt").unwrap().as_bool().unwrap_or(false)
@@ -129,6 +125,11 @@ pub fn build(config: &CrateConfig) -> Result<()> {
} }
} }
} }
} else {
log::warn!(
"Binaryen tool not found, you can use `dioxus tool add binaryen` to install it."
);
}
} }
// this code will copy all public file to the output dir // this code will copy all public file to the output dir