Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove tests from npm packages #38

Open
axelfontaine opened this issue Jul 2, 2024 · 0 comments
Open

Remove tests from npm packages #38

axelfontaine opened this issue Jul 2, 2024 · 0 comments

Comments

@axelfontaine
Copy link

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

<script src="/webjars/<<npm-package-name>>/<<primary-js-file>>"></script>

which in our case here would translate to something like

<script src="/webjars/htmx-ext-response-targets/response-targets.js"></script>

And the file response-targets.js is then automatically located within the htmx-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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant