Skip to content

Commit

Permalink
Temp fix for trying to minify html
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveBeeblebrox committed Jun 12, 2022
1 parent 7896837 commit 8fa8155
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ fn main() {
.arg(Arg::with_name("minify")
.short("M")
.long("minify")
.help("Enables minification using Terser (both compression and mangling) of output code; except for HTML files, '.min' is appended to the output file extension")
.help("Enables minification using Terser (both compression and mangling) of output code; except for HTML files, '.min' is appended to the output file extension (Currently ignored if parsing HTML)")
)

.arg(Arg::with_name("html")
Expand Down Expand Up @@ -126,7 +126,7 @@ fn main() {

let html = matches.occurrences_of("html") > 0;

let minify = matches.occurrences_of("minify") > 0;
let minify = matches.occurrences_of("minify") > 0 && !html;

let options = CompileOptions {
target: String::from(matches.value_of("target").unwrap()),
Expand Down Expand Up @@ -167,7 +167,7 @@ fn main() {
"mts" => "mjs",
_ => "js"
};
let output_type = if minify && !html {
let output_type = if minify {
format!("min.{}", output_type)
} else {
String::from(output_type)
Expand Down

0 comments on commit 8fa8155

Please sign in to comment.