.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. .TH HTML-MINIFIER-TERSER "1" "November 2023" "html-minifier-terser 7.2.0" "User Commands" .SH NAME html-minifier-terser \- JavaScript based HTML minifier .SH SYNOPSIS .B html-minifier-terser [\fI\,options\/\fR] [\fI\,files\/\fR...] .SH OPTIONS .TP \fB\-V\fR, \fB\-\-version\fR output the version number .TP \fB\-\-case\-sensitive\fR Treat attributes in case sensitive manner (useful for SVG; e.g. viewBox) .TP \fB\-\-collapse\-boolean\-attributes\fR Omit attribute values from boolean attributes .TP \fB\-\-collapse\-inline\-tag\-whitespace\fR Collapse white space around inline tag .TP \fB\-\-collapse\-whitespace\fR Collapse white space that contributes to text nodes in a document tree. .TP \fB\-\-conservative\-collapse\fR Always collapse to 1 space (never remove it entirely) .TP \fB\-\-continue\-on\-parse\-error\fR Handle parse errors instead of aborting .TP \fB\-\-custom\-attr\-assign\fR Arrays of regex'es that allows one to support custom attribute assign expressions (e.g. '
') .TP \fB\-\-custom\-attr\-collapse\fR Regex that specifies custom attribute to strip newlines from (e.g. /ng\-class/) .TP \fB\-\-custom\-attr\-surround\fR Arrays of regex'es that allows one to support custom attribute surround expressions (e.g. ) .TP \fB\-\-custom\-event\-attributes\fR Arrays of regex'es that allows one to support custom event attributes for minifyJS (e.g. ng\-click) .TP \fB\-\-decode\-entities\fR Use direct Unicode characters whenever possible .TP \fB\-\-no\-html5\fR Parse input according to HTML5 specifications .TP \fB\-\-ignore\-custom\-comments\fR Array of regex'es that allows one to ignore certain comments, when matched .TP \fB\-\-ignore\-custom\-fragments\fR Array of regex'es that allows one to ignore certain fragments, when matched (e.g. , {{ ... }}) .TP \fB\-\-no\-include\-auto\-generated\-tags\fR Insert tags generated by HTML parser .TP \fB\-\-keep\-closing\-slash\fR Keep the trailing slash on singleton elements .TP \fB\-\-max\-line\-length\fR Max line length .TP \fB\-\-minify\-css\fR [value] Minify CSS in style elements and style attributes (uses clean\-css) .TP \fB\-\-minify\-js\fR [value] Minify Javascript in script elements and on* attributes (uses terser) .TP \fB\-\-minify\-urls\fR [value] Minify URLs in various attributes (uses relateurl) .TP \fB\-\-no\-newlines\-before\-tag\-close\fR Never add a newline before a tag that closes an element .TP \fB\-\-preserve\-line\-breaks\fR Always collapse to 1 line break (never remove it entirely) when whitespace between tags include a line break. .TP \fB\-\-prevent\-attributes\-escaping\fR Prevents the escaping of the values of attributes. .TP \fB\-\-process\-conditional\-comments\fR Process contents of conditional comments through minifier .TP \fB\-\-process\-scripts\fR Array of strings corresponding to types of script elements to process through minifier (e.g. "text/ng\-template", "text/x\-handlebars\-template", etc.) .TP \fB\-\-quote\-character\fR Type of quote to use for attribute values (' or ") .TP \fB\-\-remove\-attribute\-quotes\fR Remove quotes around attributes when possible. .TP \fB\-\-remove\-comments\fR Strip HTML comments .TP \fB\-\-remove\-empty\-attributes\fR Remove all attributes with whitespace\-only values .TP \fB\-\-remove\-empty\-elements\fR Remove all elements with empty contents .TP \fB\-\-remove\-optional\-tags\fR Remove unrequired tags .TP \fB\-\-remove\-redundant\-attributes\fR Remove attributes when value matches default. .TP \fB\-\-remove\-script\-type\-attributes\fR Removes the following attributes from script tags: text/javascript, text/ecmascript, text/jscript, application/javascript, application/x\-javascript, application/ecmascript. Other type attribute values are left intact .TP \fB\-\-remove\-style\-link\-type\-attributes\fR Remove type="text/css" from style and link tags. Other type attribute values are left intact. .TP \fB\-\-remove\-tag\-whitespace\fR Remove space between attributes whenever possible .TP \fB\-\-sort\-attributes\fR Sort attributes by frequency .TP \fB\-\-sort\-class\-name\fR Sort style classes by frequency .TP \fB\-\-trim\-custom\-fragments\fR Trim white space around ignoreCustomFragments. .TP \fB\-\-use\-short\-doctype\fR Replaces the doctype with the short (HTML5) doctype .TP \fB\-o\fR \fB\-\-output\fR Specify output file (if not specified STDOUT will be used for output) .TP \fB\-c\fR \fB\-\-config\-file\fR Use config file .TP \fB\-\-input\-dir\fR Specify an input directory .TP \fB\-\-output\-dir\fR Specify an output directory .TP \fB\-\-file\-ext\fR Specify an extension to be read, ex: html .TP \fB\-h\fR, \fB\-\-help\fR display help for command