Summary printed by `edge build` after vendoring runtime + packages + scripts into dist/.
(dir: &std::path::Path, runtime_files: usize, packages: usize, scripts: usize, size: u64, elapsed: std::time::Duration)
| 81 | |
| 82 | /// Summary printed by `edge build` after vendoring runtime + packages + scripts into dist/. |
| 83 | pub fn build_report(dir: &std::path::Path, runtime_files: usize, packages: usize, scripts: usize, size: u64, elapsed: std::time::Duration) { |
| 84 | println!(); |
| 85 | if plain() { |
| 86 | println!(" bundled to {}/", dir.display()); |
| 87 | } else { |
| 88 | println!(" bundled to {}/", dir.display().to_string().cyan()); |
| 89 | } |
| 90 | println!(); |
| 91 | println!(" {runtime_files} runtime files + compiler.wasm"); |
| 92 | println!(" {packages} packages"); |
| 93 | println!(" {scripts} scripts"); |
| 94 | println!(); |
| 95 | println!(" {:.2} MB · {:.1}s", size as f64 / 1_000_000.0, elapsed.as_secs_f64()); |
| 96 | } |
| 97 | |
| 98 | /// Render an error to stderr. `{:#}` joins the cause chain so the root reason isn't swallowed. |
| 99 | pub fn error(e: &anyhow::Error) { |