html-minifier-terser icon indicating copy to clipboard operation
html-minifier-terser copied to clipboard

Grunt plugin

Open XhmikosR opened this issue 3 years ago • 4 comments

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

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

XhmikosR avatar Dec 10 '22 08:12 XhmikosR

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 avatar Dec 10 '22 13:12 DanielRuf

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.

DanielRuf avatar Dec 10 '22 13:12 DanielRuf

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.

XhmikosR avatar Dec 10 '22 21:12 XhmikosR

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?

DanielRuf avatar Dec 11 '22 09:12 DanielRuf