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

Grunt plugin #141

Open
XhmikosR opened this issue Dec 10, 2022 · 4 comments
Open

Grunt plugin #141

XhmikosR opened this issue Dec 10, 2022 · 4 comments

Comments

@XhmikosR
Copy link
Contributor

I was wondering, would it be possible to add a grunt plugin?

grunt-contrib-htmlmin is using html-minifier right now.

@DanielRuf
Copy link
Contributor

html-minifier-terser is an independent library for compressing html code.

From my side there are no plans to create a plugin for grunt, gulp, webpack, rollup and so on. The adoption of html-minifier-terser should happen in the relevant ecosystems and by other maintainers.

It is almost 6 years since I have used grunt for the last project and all newer projects used webpack. Personally I could not maintain a grunt plugin.

So maybe you can propose html-minifier-terser to the maintainers of grunt-contrib-htmlmin.

@DanielRuf
Copy link
Contributor

The mentioned plugin is already linked at https://github.com/terser/html-minifier-terser#nodejs

Since html-minifier-terser is a direct fork of html-minifier, it should be possible for the grunt plugin maintainers to easily migrate to the new solution.

@XhmikosR
Copy link
Contributor Author

I understand your point of view, believe me :)

That being said, I have push rights to the grunt-contib-htmlmin plugin repo.

I'm not sure if we could follow the approach of making html-minifier/html-minifier-terser a peer dependency or someone could release a new fork.

@DanielRuf
Copy link
Contributor

I can not really follow. peerDependencies are not meant to be like this (also not everyone uses npm >= 7). Even html-webpack-plugin uses html-minifier-terser as normal dependency. Multiple packages which depend on html-minifier-terser make not much sense in a single project.

And why a fork if you have push rights to the mentioned repo?

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