htmx
htmx copied to clipboard
Add gulp as build system to generate UMD wrapper also for extensions
This adds a minimal build system based on gulp.js to add a UMD wrapper, minify and gzip the source files, including all extensions.
Related issue #1469
I think the project would really benefit from this PR - I was already on the way to do a PR myself after discovering that extensions are not minified. When gulp is not minimal enough, we could run uglify over all distributed files?
Incorporating a build system into htmx has been discussed extensively, and then ultimately rejected. See here for some of that discussion:
- https://github.com/bigskysoftware/htmx/issues/151
- https://github.com/bigskysoftware/htmx/issues/606
- https://github.com/bigskysoftware/htmx/pull/1250
It looks like there's a reasonable workaround too? https://github.com/bigskysoftware/htmx/issues/1469#issuecomment-1577414184
The question of minifying/UMDing the extensions is a fair one. I would suggest opening an issue dedicated to it and then we can discuss the best way to handle that. I know there's some possible willingness to at least automating the UMD situation, but it's a slightly touchy subject, so a PR can't really happen until we have some consensus on that.
lol
@gnat what are you trying to tell us?
He is telling us that the he does not understand the PR at all.
@xhaggi maybe we should provide a fork which code is identical but with your PR content?
@matsp That would certainly not be the right way to go, nor is it my intention.
Sure it's not the right way. This library is getting more and more attraction and thus people will ask about this PR. Providing just a pull solution to import in their projects will lead to the right amount of pressure in the maintainer team to think about it. I don't really want to fork away, it's just about a alternative solution till this team is ready to change their minds.
Imo it's still the correct decision.