From 9d259b6073620f784da783bfe8f50c80334b59ef Mon Sep 17 00:00:00 2001 From: Miles Murgaw Date: Fri, 14 Jul 2023 18:30:27 -0400 Subject: [PATCH] revision: remove nestedness --- packages/cli/src/cli/{autoformat/mod.rs => autoformat.rs} | 0 packages/cli/src/cli/{build/mod.rs => build.rs} | 0 packages/cli/src/cli/{clean/mod.rs => clean.rs} | 0 packages/cli/src/cli/{config/mod.rs => config.rs} | 4 ++-- packages/cli/src/cli/{create/mod.rs => create.rs} | 0 packages/cli/src/cli/{plugin/mod.rs => plugin.rs} | 0 packages/cli/src/cli/{serve/mod.rs => serve.rs} | 0 packages/cli/src/cli/{tool/mod.rs => tool.rs} | 0 packages/cli/src/cli/{translate/mod.rs => translate.rs} | 2 +- 9 files changed, 3 insertions(+), 3 deletions(-) rename packages/cli/src/cli/{autoformat/mod.rs => autoformat.rs} (100%) rename packages/cli/src/cli/{build/mod.rs => build.rs} (100%) rename packages/cli/src/cli/{clean/mod.rs => clean.rs} (100%) rename packages/cli/src/cli/{config/mod.rs => config.rs} (92%) rename packages/cli/src/cli/{create/mod.rs => create.rs} (100%) rename packages/cli/src/cli/{plugin/mod.rs => plugin.rs} (100%) rename packages/cli/src/cli/{serve/mod.rs => serve.rs} (100%) rename packages/cli/src/cli/{tool/mod.rs => tool.rs} (100%) rename packages/cli/src/cli/{translate/mod.rs => translate.rs} (98%) diff --git a/packages/cli/src/cli/autoformat/mod.rs b/packages/cli/src/cli/autoformat.rs similarity index 100% rename from packages/cli/src/cli/autoformat/mod.rs rename to packages/cli/src/cli/autoformat.rs diff --git a/packages/cli/src/cli/build/mod.rs b/packages/cli/src/cli/build.rs similarity index 100% rename from packages/cli/src/cli/build/mod.rs rename to packages/cli/src/cli/build.rs diff --git a/packages/cli/src/cli/clean/mod.rs b/packages/cli/src/cli/clean.rs similarity index 100% rename from packages/cli/src/cli/clean/mod.rs rename to packages/cli/src/cli/clean.rs diff --git a/packages/cli/src/cli/config/mod.rs b/packages/cli/src/cli/config.rs similarity index 92% rename from packages/cli/src/cli/config/mod.rs rename to packages/cli/src/cli/config.rs index 5f9fa20d0..49d369802 100644 --- a/packages/cli/src/cli/config/mod.rs +++ b/packages/cli/src/cli/config.rs @@ -41,7 +41,7 @@ impl Config { return Ok(()); } let mut file = File::create(conf_path)?; - let content = String::from(include_str!("../../assets/dioxus.toml")) + let content = String::from(include_str!("../assets/dioxus.toml")) .replace("{{project-name}}", &name) .replace("{{default-platform}}", &platform); file.write_all(content.as_bytes())?; @@ -53,7 +53,7 @@ impl Config { Config::CustomHtml {} => { let html_path = crate_root.join("index.html"); let mut file = File::create(html_path)?; - let content = include_str!("../../assets/index.html"); + let content = include_str!("../assets/index.html"); file.write_all(content.as_bytes())?; log::info!("🚩 Create custom html file done."); } diff --git a/packages/cli/src/cli/create/mod.rs b/packages/cli/src/cli/create.rs similarity index 100% rename from packages/cli/src/cli/create/mod.rs rename to packages/cli/src/cli/create.rs diff --git a/packages/cli/src/cli/plugin/mod.rs b/packages/cli/src/cli/plugin.rs similarity index 100% rename from packages/cli/src/cli/plugin/mod.rs rename to packages/cli/src/cli/plugin.rs diff --git a/packages/cli/src/cli/serve/mod.rs b/packages/cli/src/cli/serve.rs similarity index 100% rename from packages/cli/src/cli/serve/mod.rs rename to packages/cli/src/cli/serve.rs diff --git a/packages/cli/src/cli/tool/mod.rs b/packages/cli/src/cli/tool.rs similarity index 100% rename from packages/cli/src/cli/tool/mod.rs rename to packages/cli/src/cli/tool.rs diff --git a/packages/cli/src/cli/translate/mod.rs b/packages/cli/src/cli/translate.rs similarity index 98% rename from packages/cli/src/cli/translate/mod.rs rename to packages/cli/src/cli/translate.rs index 81f0da3e6..a922d428d 100644 --- a/packages/cli/src/cli/translate/mod.rs +++ b/packages/cli/src/cli/translate.rs @@ -130,7 +130,7 @@ fn determine_input(file: Option, raw: Option) -> Result #[test] fn generates_svgs() { - let st = include_str!("../../../tests/svg.html"); + let st = include_str!("../../tests/svg.html"); let out = convert_html_to_formatted_rsx(&html_parser::Dom::parse(st).unwrap(), true);