Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

html-minifier needs documentation improvement #1128

Open
binarweb opened this issue May 4, 2022 · 2 comments
Open

html-minifier needs documentation improvement #1128

binarweb opened this issue May 4, 2022 · 2 comments

Comments

@binarweb
Copy link

binarweb commented May 4, 2022

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

@R4356th
Copy link
Contributor

R4356th commented May 8, 2022

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.

@binarweb
Copy link
Author

binarweb commented May 9, 2022

It is working like this. But this should be documented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants