Closed axelfontaine closed 1 week ago
Hi, I would love to pick this up if someone could guide me a little through the code perspective.
excluding them from the NPM package
That would be the best solution, maybe there's a property for that in package.json
syntax?
Haven't had time to look into this yet, so feel free to dive in @sameer-dudeja !
If you think the solution is valid, I will do the same for all the extensions so that none of them will have this issue @Telroshan @alexpetros
Oh so there was such a thing as a npm ignore file, nice! Sure, feel free to do it for all extensions at once as the issue is the same for all of them.
Closing as this has been fixed with the merge of
The primary way to consume HTMX in the JVM/Java ecosystem is through Webjars.
Webjars makes it convenient to consume NPM dependencies, by automatically transforming them into jar files (the JVM's library format) which lets JVM users consume them through their regular build tool and package management.
A central component of webjars is the locator. Its primary function is allowing you to shorten the directory structure by omitting version numbers and intermediate directories.
All you need to do is write things like
which in our case here would translate to something like
And the file
response-targets.js
is then automatically located within thehtmx-ext-response-targets
webjar (which was built automatically from the corresponsing NPM package).This works for almost every NPM package out there, including HTMX. Unfortunetly it breaks down for the extensions from this repository:
See:
The reason it breaks down is that both the main extension file and its test share the same name. Either renaming the test files, or even better, excluding them from the NPM package (why are they even in there to begin with?), would instantly fix this issue for all webjar users out there.
While this isn't really your problem per se, the JVM userbase is very large, and I'd like to ask you to please consider fixing this. It should require minimal effort and will make a big difference for many users out there.