public final class RequireJS
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
WEBJARS_MAVEN_PREFIX |
| Constructor and Description |
|---|
RequireJS() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
generateSetupJavaScript(java.util.List<java.lang.String> prefixes)
Returns the JavaScript that is used to setup the RequireJS config.
|
static java.lang.String |
generateSetupJavaScript(java.util.List<java.lang.String> prefixes,
java.util.Map<java.lang.String,java.lang.String> webJars)
Deprecated.
|
static java.util.Map<java.lang.String,com.fasterxml.jackson.databind.node.ObjectNode> |
generateSetupJson(java.util.List<java.util.Map.Entry<java.lang.String,java.lang.Boolean>> prefixes)
Returns the JSON used to setup the RequireJS config for each WebJar in the CLASSPATH.
|
static com.fasterxml.jackson.databind.node.ObjectNode |
getBowerWebJarRequireJsConfig(java.util.Map.Entry<java.lang.String,java.lang.String> webJar,
java.util.List<java.util.Map.Entry<java.lang.String,java.lang.Boolean>> prefixes)
Returns the JSON RequireJS config for a given Bower WebJar
|
static com.fasterxml.jackson.databind.node.ObjectNode |
getNpmWebJarRequireJsConfig(java.util.Map.Entry<java.lang.String,java.lang.String> webJar,
java.util.List<java.util.Map.Entry<java.lang.String,java.lang.Boolean>> prefixes)
Returns the JSON RequireJS config for a given Bower WebJar
|
static java.lang.String |
getRawWebJarRequireJsConfig(java.util.Map.Entry<java.lang.String,java.lang.String> webJar) |
static java.lang.String |
getSetupJavaScript(java.lang.String urlPrefix)
Returns the JavaScript that is used to setup the RequireJS config.
|
static java.lang.String |
getSetupJavaScript(java.lang.String cdnPrefix,
java.lang.String urlPrefix)
Returns the JavaScript that is used to setup the RequireJS config.
|
static java.util.Map<java.lang.String,com.fasterxml.jackson.databind.node.ObjectNode> |
getSetupJson(java.lang.String urlPrefix)
Returns the JSON that is used to setup the RequireJS config.
|
static java.util.Map<java.lang.String,com.fasterxml.jackson.databind.node.ObjectNode> |
getSetupJson(java.lang.String cdnPrefix,
java.lang.String urlPrefix)
Returns the JSON that is used to setup the RequireJS config.
|
static java.lang.String |
getWebJarConfig(java.util.Map.Entry<java.lang.String,java.lang.String> webJar)
Deprecated.
|
static com.fasterxml.jackson.databind.node.ObjectNode |
getWebJarRequireJsConfig(java.util.Map.Entry<java.lang.String,java.lang.String> webJar,
java.util.List<java.util.Map.Entry<java.lang.String,java.lang.Boolean>> prefixes)
Returns the JSON RequireJS config for a given WebJar
|
public static final java.lang.String WEBJARS_MAVEN_PREFIX
public static java.lang.String getSetupJavaScript(java.lang.String urlPrefix)
urlPrefix - The URL prefix where the WebJars can be downloaded from with a trailing slash, e.g. /webJars/public static java.lang.String getSetupJavaScript(java.lang.String cdnPrefix,
java.lang.String urlPrefix)
urlPrefix - The URL prefix where the WebJars can be downloaded from with a trailing slash, e.g. /webJars/cdnPrefix - The optional CDN prefix where the WebJars can be downloaded frompublic static java.lang.String generateSetupJavaScript(java.util.List<java.lang.String> prefixes)
prefixes - A list of the prefixes to use in the `paths` part of the RequireJS config.@Deprecated
public static java.lang.String generateSetupJavaScript(java.util.List<java.lang.String> prefixes,
java.util.Map<java.lang.String,java.lang.String> webJars)
prefixes - A list of the prefixes to use in the `paths` part of the RequireJS config.webJars - The WebJars (artifactId -> version) to usepublic static java.util.Map<java.lang.String,com.fasterxml.jackson.databind.node.ObjectNode> getSetupJson(java.lang.String urlPrefix)
urlPrefix - The URL prefix where the WebJars can be downloaded from with a trailing slash, e.g. /webJars/public static java.util.Map<java.lang.String,com.fasterxml.jackson.databind.node.ObjectNode> getSetupJson(java.lang.String cdnPrefix,
java.lang.String urlPrefix)
cdnPrefix - The CDN prefix where the WebJars can be downloaded fromurlPrefix - The URL prefix where the WebJars can be downloaded from with a trailing slash, e.g. /webJars/public static java.util.Map<java.lang.String,com.fasterxml.jackson.databind.node.ObjectNode> generateSetupJson(java.util.List<java.util.Map.Entry<java.lang.String,java.lang.Boolean>> prefixes)
prefixes - A list of the prefixes to use in the `paths` part of the RequireJS config with a boolean flag
indicating whether or not to include the version.public static com.fasterxml.jackson.databind.node.ObjectNode getWebJarRequireJsConfig(java.util.Map.Entry<java.lang.String,java.lang.String> webJar,
java.util.List<java.util.Map.Entry<java.lang.String,java.lang.Boolean>> prefixes)
webJar - A tuple (artifactId -> version) representing the WebJar.prefixes - A list of the prefixes to use in the `paths` part of the RequireJS config.public static com.fasterxml.jackson.databind.node.ObjectNode getBowerWebJarRequireJsConfig(java.util.Map.Entry<java.lang.String,java.lang.String> webJar,
java.util.List<java.util.Map.Entry<java.lang.String,java.lang.Boolean>> prefixes)
webJar - A tuple (artifactId -> version) representing the WebJar.prefixes - A list of the prefixes to use in the `paths` part of the RequireJS config.public static com.fasterxml.jackson.databind.node.ObjectNode getNpmWebJarRequireJsConfig(java.util.Map.Entry<java.lang.String,java.lang.String> webJar,
java.util.List<java.util.Map.Entry<java.lang.String,java.lang.Boolean>> prefixes)
webJar - A tuple (artifactId -> version) representing the WebJar.prefixes - A list of the prefixes to use in the `paths` part of the RequireJS config.public static java.lang.String getRawWebJarRequireJsConfig(java.util.Map.Entry<java.lang.String,java.lang.String> webJar)
webJar - A tuple (artifactId -> version) representing the WebJar.@Deprecated public static java.lang.String getWebJarConfig(java.util.Map.Entry<java.lang.String,java.lang.String> webJar)
webJar - A tuple (artifactId -> version) representing the WebJar.Copyright © 2019. All Rights Reserved.