webjars / webjars-locator-core

Webjars-locator core functionality
MIT License
19 stars 32 forks source link

Ignore test assets by default #164

Open axelfontaine opened 3 months ago

axelfontaine commented 3 months ago

org.webjars.npm:htmx-ext-response-targets:2.0.0 contains two response-targets.js files. One in the root and one in the test directory.

Either the Webjar locator or the webjar building process should ignore that test directory.

jamesward commented 3 months ago

There isn't a good general way to exclude these from being located. The only alternative is to use a non-partial patching method under the routing, ie:

locator.getFullPathExact("htmx-ext-response-targets", "response-targets.js");

That should resolve to the root file. Is changing the routing logic to use that instead of locator.getFullPath an option?

axelfontaine commented 3 months ago

Not in my case, as I rely on Ktor's integration of Webjars and don't consume the locator dependency directly.