A CSS link tag
A CSS link tag
Name of the WebJar
A path to an asset in the WebJar
A string with the tag or an error / empty string (depending on mode)
A CSS link tag
A CSS link tag
A call that will become a url
A string with the tag or an error / empty string (depending on mode)
A CSS link tag
A CSS link tag
A call that will become a url
A string with the tag or an error / empty string (depending on mode)
A CSS link tag
A CSS link tag
A possible url
A string with the tag or an error / empty string (depending on mode)
Get the full path to a file in a WebJar without validating that the file actually exists
Get the full path to a file in a WebJar without validating that the file actually exists
the WebJar artifactId
the full path to a file in the WebJar
the path to the file (sans-the webjars prefix)
Calling fullPath("react", "react.js") will return the full path to the file in the WebJar because react.js exists at the root of the WebJar
Get the groupId from a path
Get the groupId from a path
a string to parse a WebJar name from
the artifact groupId based on the classpath
groupId("jquery/1.9.0/jquery.js") will return "org.webjars" if the classpath contains the org.webjars jquery jar
Based on config, either returns a local url or a cdn url for a given asset path
Based on config, either returns a local url or a cdn url for a given asset path
Possibly a path to convert to a local url or cdn url
Possibly the local or cdn url
Locate a file in a WebJar
Locate a file in a WebJar
the WebJar artifactId
the file or partial path to find
the path to the file (sans-the webjars prefix)
Locate a file in a WebJar
Locate a file in a WebJar
the file or partial path to find
the path to the file (sans-the webjars prefix)
Passing in jquery.min.js will return jquery/1.8.2/jquery.min.js assuming the jquery WebJar version 1.8.2 is on the classpath
Generates the RequireJS config and main script tags
Generates the RequireJS config and main script tags
The reverse route of the main app
The RequireJS config and main script tags
A script tag
A script tag
Name of the WebJar
A path to an asset in the WebJar
A string with the tag or an error / empty string (depending on mode)
A script tag
A script tag
A path that becomes a url
A string with the tag or an error / empty string (depending on mode)
A script tag
A script tag
A call that becomes a url
A string with the tag or an error / empty string (depending on mode)
A script tag
A script tag
A possible url
Other params for the script tag
A string with the tag or an error / empty string (depending on mode)
A script tag
A script tag
Name of the WebJar
A path to an asset in the WebJar
Other params to add to the script tag
A string with the tag or an error / empty string (depending on mode)
Turns a possible url into a tag using a provided function.
Turns a possible url into a tag using a provided function. Uses the mode of the application to determine if an error should be returned or not.
A possible url
A function that will render a successful url
The tag to be rendered or when there is an error, an emtpy string in Prod mode and an error comment otherwise
Locates a WebJar from a partial path and returns the reverse route
Locates a WebJar from a partial path and returns the reverse route
The artifact name of the WebJar
The partial path of a file in a WebJar
The reverse route to the WebJar asset
Locates a WebJar from a partial path and returns the reverse route or CDN URL
Locates a WebJar from a partial path and returns the reverse route or CDN URL
The partial path of a file in a WebJar
The reverse route to the WebJar asset
WebJars Util
Config:
webjars.filter-expression can be used to declare a regex for the files that should be looked for when searching within WebJars. By default all files are searched for.
webjars.cdn-url overrides the default CDN url (https://cdn.jsdelivr.net/webjars)
webjars.use-cdn toggles the CDN