Note to self
A quick way of minifying an HTML file including the <style>
and <script>
tags within it.
Start by installing the HTML minifier with:
npm install html-minifier -g
Execute the minifier command:
html-minifier --minify-css true --minify-js true input.htm -o output.htm
Additional options:
--collapse-whitespace
--remove-comments
--remove-optional-tags
--remove-redundant-attributes
--remove-script-type-attributes
--remove-tag-whitespace
--use-short-doctype
Top comments (1)
For the people, who want to do that process, through the online tool, they can use those links as well
url-decode.com/tool/minifyhtml
minifycode.com/
willpeavy.com/tools/minifier/