public final class RequireJS extends Object
Modifier and Type | Field and Description |
---|---|
static String |
WEBJARS_MAVEN_PREFIX |
Constructor and Description |
---|
RequireJS() |
Modifier and Type | Method and Description |
---|---|
static String |
generateSetupJavaScript(List<String> prefixes)
Returns the JavaScript that is used to setup the RequireJS config.
|
static String |
generateSetupJavaScript(List<String> prefixes,
Map<String,String> webJars)
Deprecated.
|
static Map<String,com.fasterxml.jackson.databind.node.ObjectNode> |
generateSetupJson(List<Map.Entry<String,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(Map.Entry<String,String> webJar,
List<Map.Entry<String,Boolean>> prefixes)
Returns the JSON RequireJS config for a given Bower WebJar
|
static com.fasterxml.jackson.databind.node.ObjectNode |
getNpmWebJarRequireJsConfig(Map.Entry<String,String> webJar,
List<Map.Entry<String,Boolean>> prefixes)
Returns the JSON RequireJS config for a given Bower WebJar
|
static String |
getRawWebJarRequireJsConfig(Map.Entry<String,String> webJar) |
static String |
getSetupJavaScript(String urlPrefix)
Returns the JavaScript that is used to setup the RequireJS config.
|
static String |
getSetupJavaScript(String cdnPrefix,
String urlPrefix)
Returns the JavaScript that is used to setup the RequireJS config.
|
static Map<String,com.fasterxml.jackson.databind.node.ObjectNode> |
getSetupJson(String urlPrefix)
Returns the JSON that is used to setup the RequireJS config.
|
static Map<String,com.fasterxml.jackson.databind.node.ObjectNode> |
getSetupJson(String cdnPrefix,
String urlPrefix)
Returns the JSON that is used to setup the RequireJS config.
|
static String |
getWebJarConfig(Map.Entry<String,String> webJar)
Deprecated.
|
static com.fasterxml.jackson.databind.node.ObjectNode |
getWebJarRequireJsConfig(Map.Entry<String,String> webJar,
List<Map.Entry<String,Boolean>> prefixes)
Returns the JSON RequireJS config for a given WebJar
|
public static final String WEBJARS_MAVEN_PREFIX
public static String getSetupJavaScript(String urlPrefix)
urlPrefix
- The URL prefix where the WebJars can be downloaded from with a trailing slash, e.g. /webJars/public static String getSetupJavaScript(String cdnPrefix, 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 String generateSetupJavaScript(List<String> prefixes)
prefixes
- A list of the prefixes to use in the `paths` part of the RequireJS config.@Deprecated public static String generateSetupJavaScript(List<String> prefixes, Map<String,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 Map<String,com.fasterxml.jackson.databind.node.ObjectNode> getSetupJson(String urlPrefix)
urlPrefix
- The URL prefix where the WebJars can be downloaded from with a trailing slash, e.g. /webJars/public static Map<String,com.fasterxml.jackson.databind.node.ObjectNode> getSetupJson(String cdnPrefix, 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 Map<String,com.fasterxml.jackson.databind.node.ObjectNode> generateSetupJson(List<Map.Entry<String,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(Map.Entry<String,String> webJar, List<Map.Entry<String,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(Map.Entry<String,String> webJar, List<Map.Entry<String,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(Map.Entry<String,String> webJar, List<Map.Entry<String,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 String getRawWebJarRequireJsConfig(Map.Entry<String,String> webJar)
webJar
- A tuple (artifactId -> version) representing the WebJar.@Deprecated public static String getWebJarConfig(Map.Entry<String,String> webJar)
webJar
- A tuple (artifactId -> version) representing the WebJar.Copyright © 2019. All rights reserved.