Open R4356th opened 2 years ago
Can confirm this behaviour. It will reclusively create folders in folders.
Windows 11 Using version V4.0.0
Command used.
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 --input-dir source/path/to/pages --output-dir source/path/to/pages/mini --file-ext html
This results in a directory structure:
-pages
--mini
---output files
On the next run
-pages
--mini
---mini
----output files
Each run will create a mini sub directory in the previous mini sub directory.
If the specified output-dir already exists when using the CLI, it creates a new directory with that name and puts minified versions of the input (making sure to update the copy in the already existing directory as well). While a straightforward workaround is to just ignore the duplicate directory in VCS, it is not ideal and not even an option for those who do not use any VCS. See also #1062).