webstormhtml-minifier

WebStorm File Watcher HTML minify


I'm trying to minify my HTML document using a File Watcher and it does nothing.

I tried googling my problem and found this Link from SO, I tried the solution that was in Russian but didn't work for me either.

Also, the working Dir is $FileDir$

Problem


Solution

  • What doesn't work for you namely? The settings from this SO link work fine for me with the most recent html-minifier version:

    Arguments: $FileName$ --collapse-boolean-attributes --collapse-whitespace --html5 --remove-attribute-quotes --remove-comments --remove-empty-attributes --remove-optional-tags --remove-redundant-attributes --remove-script-type-attributes --remove-style-link-type-attributes --remove-tag-whitespace --sort-attributes --sort-class-name --trim-custom-fragments --use-short-doctype --minify-js -o $FileNameWithoutExtension$.min.html

    Output paths to refresh: $FileNameWithoutExtension$.min.html

    Working directory: $FileDir$

    enter image description here