fix: builds of CLI

This commit is contained in:
Jonathan Kelley 2022-12-07 12:55:28 -08:00
parent 2e804f71b3
commit aa05dc3054
3 changed files with 19 additions and 23 deletions

12
Cargo.lock generated
View file

@ -572,7 +572,7 @@ dependencies = [
"chrono",
"clap",
"colored 2.0.0",
"convert_case",
"convert_case",
"ctrlc",
"dioxus-core",
"dioxus-rsx",
@ -616,7 +616,6 @@ dependencies = [
"dyn-clone",
"futures-channel",
"futures-util",
"fxhash",
"indexmap",
"log",
"longest-increasing-subsequence",
@ -907,15 +906,6 @@ dependencies = [
"slab",
]
[[package]]
name = "fxhash"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
dependencies = [
"byteorder",
]
[[package]]
name = "generic-array"
version = "0.14.6"

View file

@ -46,7 +46,12 @@ walkdir = "2"
# tools download
dirs = "4.0.0"
reqwest = { version = "0.11", features = ["rustls-tls", "stream", "trust-dns", "blocking"] }
reqwest = { version = "0.11", features = [
"rustls-tls",
"stream",
"trust-dns",
"blocking",
] }
flate2 = "1.0.22"
tar = "0.4.38"
zip = "0.6.2"
@ -54,18 +59,20 @@ tower = "0.4.12"
syn = { version = "1.0", features = ["full", "extra-traits"] }
dioxus-core = { git = "https://github.com/dioxuslabs/dioxus/", features = [
"hot-reload",
] }
dioxus-rsx = { git = "https://github.com/dioxuslabs/dioxus/", features = [
"hot-reload",
] }
dioxus-core = { git = "https://github.com/dioxuslabs/dioxus/" }
dioxus-rsx = { git = "https://github.com/dioxuslabs/dioxus/" }
proc-macro2 = { version = "1.0", features = ["span-locations"] }
lazy_static = "1.4.0"
# plugin packages
mlua = { version = "0.8.1", features = ["lua54", "vendored", "async", "send", "macros"] }
mlua = { version = "0.8.1", features = [
"lua54",
"vendored",
"async",
"send",
"macros",
] }
ctrlc = "3.2.3"
[[bin]]

View file

@ -237,7 +237,6 @@ pub async fn startup_hot_reload(port: u16, config: CrateConfig) -> Result<()> {
.unwrap();
}
// start serve dev-server at 0.0.0.0:8080
print_console_info(
port,
@ -453,13 +452,13 @@ pub struct PrettierOptions {
}
fn print_console_info(port: u16, config: &CrateConfig, options: PrettierOptions) {
if let Ok(native_clearseq) = Command::new(if cfg!(target_os = "windows") {
"cls"
} else {
"clear"
})
.output() {
.output()
{
print!("{}", String::from_utf8_lossy(&native_clearseq.stdout));
} else {
// Try ANSI-Escape characters
@ -497,7 +496,7 @@ fn print_console_info(port: u16, config: &CrateConfig, options: PrettierOptions)
"False"
};
if options.changed.len() <= 0 {
if options.changed.is_empty() {
println!(
"{} @ v{} [{}] \n",
"Dioxus".bold().green(),