Skip to content

Smarter loading of resources from WebJars #633

@armanbilge

Description

@armanbilge

Some good ideas from @valencik in #628 (comment):

@armanbilge how bad would it be to read the pom.properties at build time? Something like this:

def webjarVersion(artifactId: String): String = {
  val propsPath = s"/META-INF/maven/org.webjars.npm/$artifactId/pom.properties"
  val props = java.util.Properties()
  props.load(classOf[Main.type].getResourceAsStream(propsPath))
  props.getProperty("version")
}

I get that Scala Steward is smart enough to bump both versions, but I never am when manually doing/testing things.

Actually, more so than just versioning, we could have a little helper class for loading resources from webjars

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions