From 7caaa0490323725bfbdf8026f13ca4723625f387 Mon Sep 17 00:00:00 2001 From: Boshen Date: Sat, 11 Mar 2023 22:50:29 +0800 Subject: [PATCH] feat(cli): ignore files with `min` suffix --- crates/oxc_cli/src/walk.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/oxc_cli/src/walk.rs b/crates/oxc_cli/src/walk.rs index 26fa71ef7..52e307402 100644 --- a/crates/oxc_cli/src/walk.rs +++ b/crates/oxc_cli/src/walk.rs @@ -34,6 +34,10 @@ impl Walk { if !file_type.is_file() { return false; } + let Some(file_name) = dir_entry.path().file_name() else { return false }; + if [".min.", "-min.", "_min."].iter().any(|e| file_name.to_string_lossy().contains(e)) { + return false; + } let Some(extension) = dir_entry.path().extension() else { return false }; VALID_EXTENSIONS.contains(&extension.to_string_lossy().as_ref()) }