public final class RequireJS
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
requireConfigJavaScript |
protected static java.lang.String |
requireConfigJavaScriptCdn |
protected static java.util.Map<java.lang.String,com.fasterxml.jackson.databind.node.ObjectNode> |
requireConfigJson |
protected static java.util.Map<java.lang.String,com.fasterxml.jackson.databind.node.ObjectNode> |
requireConfigJsonCdn |
static java.lang.String |
WEBJARS_MAVEN_PREFIX |
| Constructor and Description |
|---|
RequireJS() |
| Modifier and Type | Method and Description |
|---|---|
protected static java.lang.String |
generateSetupJavaScript(java.util.List<java.lang.String> prefixes)
Returns the JavaScript that is used to setup the RequireJS config.
|
protected 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.lang.String> prefixes)
Returns the JSON used to setup the RequireJS config for each WebJar in the CLASSPATH.
|
protected 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.
|
protected static java.lang.String |
getWebJarConfig(java.util.Map.Entry<java.lang.String,java.lang.String> webJar)
Deprecated.
|
protected static com.fasterxml.jackson.databind.node.ObjectNode |
getWebJarRequireJsConfig(java.util.Map.Entry<java.lang.String,java.lang.String> webJar,
java.util.List<java.lang.String> prefixes)
Returns the JSON RequireJS config for a given WebJar
|
public static final java.lang.String WEBJARS_MAVEN_PREFIX
protected static java.lang.String requireConfigJavaScript
protected static java.lang.String requireConfigJavaScriptCdn
protected static java.util.Map<java.lang.String,com.fasterxml.jackson.databind.node.ObjectNode> requireConfigJson
protected static java.util.Map<java.lang.String,com.fasterxml.jackson.databind.node.ObjectNode> requireConfigJsonCdn
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 fromprotected 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
protected 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.lang.String> prefixes)
prefixes - A list of the prefixes to use in the `paths` part of the RequireJS config.protected static com.fasterxml.jackson.databind.node.ObjectNode getWebJarRequireJsConfig(java.util.Map.Entry<java.lang.String,java.lang.String> webJar,
java.util.List<java.lang.String> 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.protected 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 protected 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 © 2014. All Rights Reserved.