* clean up logging to avoid random extra trace * fix race condition with updates * properly wire up verbose * fix bundling (macos) and logging * Add structured output * clean up clap names * extract out wire format * switch structured key to json * fix random println, fallback to `dioxus/platform` * clean up logging for run/build * clean up logging around project * remove manual exits * fix tokio runtime for mobile * rework dog app * rip out ssg * Switch dioxus/axum to dioxus/server * add android template inline * pre restructure for bundle prep * add the whole res directory * Better theme for the app * remove mobile demo now that most apps work natively * self-referential android * only use deep linking for assets * fix imports for android * clippy, fixup ios and android * I'm not boxing compiler message you can't make me * fix clippy on unix
27 lines
731 B
Rust
27 lines
731 B
Rust
use super::*;
|
|
use crate::Result;
|
|
|
|
/// Clean build artifacts.
|
|
///
|
|
/// Simlpy runs `cargo clean`
|
|
#[derive(Clone, Debug, Parser)]
|
|
pub(crate) struct Clean {}
|
|
|
|
impl Clean {
|
|
/// todo(jon): we should add a config option that just wipes target/dx and target/dioxus-client instead of doing a full clean
|
|
pub(crate) async fn clean(self) -> Result<StructuredOutput> {
|
|
let output = tokio::process::Command::new("cargo")
|
|
.arg("clean")
|
|
.stdout(Stdio::piped())
|
|
.stderr(Stdio::piped())
|
|
.output()
|
|
.await?;
|
|
|
|
if !output.status.success() {
|
|
return Err(anyhow::anyhow!("Cargo clean failed.").into());
|
|
}
|
|
|
|
Ok(StructuredOutput::Success)
|
|
}
|
|
}
|