From 284f908c3274f912b2e913a299e9296f17226386 Mon Sep 17 00:00:00 2001 From: Wilson Lin Date: Tue, 5 Jul 2022 12:09:00 +1000 Subject: [PATCH] Update changelog --- CHANGELOG.md | 2 ++ cli/Cargo.toml | 2 +- cli/src/main.rs | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 55ef394..a88f40e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## 0.10.0 - Drop unmatched closing tags instead of reinterpreting them as opening tags. This avoids the possibility of unintentionally creating a large deep tree due to malformed inputs where there are repeated unmatched closing tags (e.g. broken HTML template). +- Fix parallel minification in CLI mode, where some inputs were ignored. +- Output file names as they're processed in parallel mode from the CLI. ## 0.9.2 diff --git a/cli/Cargo.toml b/cli/Cargo.toml index b4c37bd..5a89cd2 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -8,8 +8,8 @@ edition = "2018" [dependencies] minify-html = { path = "../rust/main" } -structopt = "0.3" rayon = "1.5" +structopt = "0.3" [profile.release] lto = true diff --git a/cli/src/main.rs b/cli/src/main.rs index 108e07b..5f38c24 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -98,7 +98,7 @@ fn main() { }); if args.inputs.len() <= 1 { - // single file mode or stdin mode + // Single file mode or stdin mode. let input_name = args .inputs .get(0) @@ -155,6 +155,7 @@ fn main() { out_file.write_all(&out_code), "Could not save minified code" ); + // Just print the name, since this is the default output and any prefix becomes redundant. It'd also allow piping into another command (quite nice for something like `minify-html *.html | xargs gzip`), copying as list of files, etc. println!("{}", input_name); }); }