html-minifier
html-minifier copied to clipboard
html-minifier needs documentation improvement
I've been trying to use html-minifier
via CLI, but I hit a wall.
The GitHub page doesn't have a manual or any example.
The only way I could gather some info was by running html-minifier --help
or by browsing different blog posts.
I was trying to minify some .html
files in a directory and the html-minifier
tries to minify the .htaccess
file.
It would be nice to have an input parameter to point to the .html
files.
The command I ran was:
npx html-minifier --input-dir ./public/ --output-dir ./public2
The error was:
Minification error on public .htaccess
Try npx html-minifier --input-dir ./public/ --output-dir ./public2 --file-ext html
; that way html-minifier
does not attempt to minify non-HTML files.
It is working like this. But this should be documented.