use std::fs::File; use std::io::{stdin, stdout, Read, Write}; use std::process::exit; use std::sync::Arc; use rayon::iter::{IntoParallelRefIterator, ParallelIterator}; use structopt::StructOpt; use minify_html::{minify, Cfg}; #[derive(StructOpt)] #[structopt( name = "minify-html", about = "Extremely fast and smart HTML + JS + CSS minifier" )] // WARNING: Keep descriptions in sync with Cfg. struct Cli { /// Files to minify; omit for stdin. If more than one is provided, they will be parallel minified in place, and --output must be omitted. #[structopt(parse(from_os_str))] inputs: Vec, /// Output destination; omit for stdout. #[structopt(short, long, parse(from_os_str))] output: Option, /// Minify JS in `