alter the original file and make a backup

This commit is contained in:
Spirit 👾 2024-08-26 17:22:40 +03:00
parent 8548bd4ce3
commit 03fa083aff

View File

@ -68,8 +68,9 @@ if [[ -f "$html_file" ]]; then
fi fi
done < "${html_file}.tmp" done < "${html_file}.tmp"
html-minifier --collapse-whitespace --remove-comments --remove-optional-tags --remove-redundant-attributes --remove-script-type-attributes --remove-tag-whitespace --use-short-doctype --minify-css true --minify-js true "${html_file}.tmp" > "min.${html_file}" cp "$html_file" ".original-${html_file}"
echo generated "min.${html_file}" echo generated ".original-${html_file}"
html-minifier --collapse-whitespace --remove-comments --remove-optional-tags --remove-redundant-attributes --remove-script-type-attributes --remove-tag-whitespace --use-short-doctype --minify-css true --minify-js true "${html_file}.tmp" > "$html_file"
fi fi
# Clean up generated files # Clean up generated files