Closed casselc closed 8 months ago
Hey @casselc, really appreciate you adding all these changes! I will definitely merge these changes, but I just want to ask your opinion on a change before I do.
I feel that the naming of the build
option makes it a bit hard to know what it is going to do without looking at the documentation. What's your opinion on changing it to something like includeBuildExtension
or includeExtension
?
Renaming is no problem, do you think filter
should be renamed to something like excludeExtension
to match? After looking more at how html-minifier-terser
works, this PR is still a little rough around the edges. Working on a revision that also exposes the terser
config, but trying to make sure I have the different minification scenarios thought through.
One of my regrets was allowing the name to be filter
. I had the same thought of renaming it but am considering not because it would involve a breaking change to projects I know who are using it. Maybe with the significant amount of changes we can consider a 2.0 release which would make this a non issue.
Admittedly I'm a bit concerned about exposing the CSS and HTML options, due to them becoming hard dependencies. But I won't let perfect be the enemy of the good.
Great work overall, love the thought that's going into this! Can't wait for the finished pull request!
Hey @casselc,
I would love to commit this pull request to the main repository. If you don't have time to finish off this PR I can incorporate it into the main repo and do so myself. I think the changes here would greatly benefit the project.
Stacked with #8
This adds
cssOptions
andhtmlOptions
parameters that allow configuration of the underlyingminify
calls.