From 6115afc36669bbf5db3d177a65c5261e73a18fcf Mon Sep 17 00:00:00 2001 From: Amos Wenger Date: Thu, 5 Dec 2024 21:26:06 +0100 Subject: [PATCH] Default to finding everything, not necessarily under a mods/ folder --- dylo-cli/src/main.rs | 8 ++++---- dylo-runtime/README.md | 2 +- dylo-runtime/src/details.rs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dylo-cli/src/main.rs b/dylo-cli/src/main.rs index 28925f6..0639d00 100644 --- a/dylo-cli/src/main.rs +++ b/dylo-cli/src/main.rs @@ -18,9 +18,9 @@ const DYLO_RUNTIME_VERSION: &str = "1.0.0"; struct ModInfo { /// human-readable name of the mod, extracted from the directory name (without mod- prefix) name: String, - /// location of the mod's implementation code ($workspace/mods/mod-$name/) + /// location of the mod's implementation code ($workspace/mod-$name/) mod_path: Utf8PathBuf, - /// destination path for generating consumer version ($workspace/mods/$name/) + /// destination path for generating consumer version ($workspace/$name/) con_path: Utf8PathBuf, /// timestamp of most recently modified file in mod directory mod_timestamp: SystemTime, @@ -36,7 +36,7 @@ enum ProcessReason { Modified, } -/// Discover all mods in the `mods/` directory. +/// Discover all mods in the `./` directory, recursively fn list_mods(mods_dir: &camino::Utf8Path) -> std::io::Result> { let mut mods = Vec::new(); for entry in fs_err::read_dir(mods_dir)? { @@ -761,7 +761,7 @@ fn main() -> std::io::Result<()> { } let args = parse_args(); - let mods_dir = Utf8Path::new("mods"); + let mods_dir = Utf8Path::new("."); let mut mods = list_mods(mods_dir)?; tracing::info!("🔍 Found {} mods total", mods.len()); diff --git a/dylo-runtime/README.md b/dylo-runtime/README.md index 30ca2d9..b4f0249 100644 --- a/dylo-runtime/README.md +++ b/dylo-runtime/README.md @@ -9,7 +9,7 @@ However, this is the right place to learn about environment variables that will impact the behavior of dylo-runtime: -* `DYLO_TARGET_DIR`: Set the build directory for hot-reloadable plugins. By default, plugins are built into `$HOME/.con-mods/{mod-name}` or `%USERPROFILE%\.con-mods\{mod-name}` on Windows. +* `DYLO_TARGET_DIR`: Set the build directory for hot-reloadable plugins. By default, plugins are built into `$HOME/.dylo-mods/{mod-name}` or `%USERPROFILE%\.dylo-mods\{mod-name}` on Windows. * `DYLO_BUILD`: Set to "0" to disable automatic mod compilation. Defaults to "1". Set to "verbose" to have cargo inherit stdout/stderr, which will show progress messages diff --git a/dylo-runtime/src/details.rs b/dylo-runtime/src/details.rs index 7fe947b..9bb7b6e 100644 --- a/dylo-runtime/src/details.rs +++ b/dylo-runtime/src/details.rs @@ -33,7 +33,7 @@ fn get_target_dir(mod_name: &str) -> std::path::PathBuf { .expect("Neither HOME nor USERPROFILE environment variables are set"); std::path::PathBuf::from(home_dir) - .join(".con-mods") + .join(".dylo-mods") .join(mod_name) }