htmx icon indicating copy to clipboard operation
htmx copied to clipboard

Add gulp as build system to generate UMD wrapper also for extensions

Open xhaggi opened this issue 2 years ago • 1 comments
trafficstars

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

xhaggi avatar Jun 06 '23 09:06 xhaggi

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?

matsp avatar Jun 29 '23 09:06 matsp

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.

alexpetros avatar Jul 17 '23 01:07 alexpetros

image

lol

gnat avatar Aug 17 '23 14:08 gnat

@gnat what are you trying to tell us?

xhaggi avatar Aug 17 '23 15:08 xhaggi

He is telling us that the he does not understand the PR at all.

matsp avatar Aug 17 '23 15:08 matsp

@xhaggi maybe we should provide a fork which code is identical but with your PR content?

matsp avatar Aug 17 '23 15:08 matsp

@matsp That would certainly not be the right way to go, nor is it my intention.

xhaggi avatar Aug 17 '23 18:08 xhaggi

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.

matsp avatar Aug 17 '23 19:08 matsp

Imo it's still the correct decision.

andryyy avatar Aug 17 '23 19:08 andryyy