test(es/minifier): Organize simple size tests (#5402)

This commit is contained in:
Donny/강동윤 2022-08-06 22:01:01 +09:00 committed by GitHub
parent 36d275a6dc
commit 7b8658eef2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
35 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,4 @@
#!/usr/bin/env bash
set -eu
cat list.txt | xargs -L 1 -I {} ./scripts/reduce-size.sh {}

View File

@ -48,7 +48,22 @@ impl EnsureSize {
return Ok(()); return Ok(());
} }
for report in &results { for report in &results {
println!();
println!("{}", report.fm.name); println!("{}", report.fm.name);
if let Some(terser) = &report.terser {
if report.swc.mangled_size > terser.mangled_size {
println!(" Mangled");
println!(" swc: {} bytes", report.swc.mangled_size);
println!(" terser: {} bytes", terser.mangled_size);
}
if report.swc.no_mangle_size > terser.no_mangle_size {
println!(" No-mangle");
println!(" swc: {} bytes", report.swc.no_mangle_size);
println!(" terser: {} bytes", terser.no_mangle_size);
}
}
} }
bail!("found some issues") bail!("found some issues")