public class WebJarExtractor extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
BOWER_JSON
The bower.json file name.
|
static String |
PACKAGE_JSON
The node_modules directory prefix as a convenience.
|
| Constructor and Description |
|---|
WebJarExtractor() |
WebJarExtractor(ClassLoader classLoader) |
| Modifier and Type | Method and Description |
|---|---|
void |
extractAllBowerComponentsTo(File to)
Extract the bower_components of all WebJars and merge them into the same folder.
|
void |
extractAllNodeModulesTo(File to)
Extract the node_modules of all WebJars and merge them into the same folder.
|
void |
extractAllWebJarsTo(File to)
Extract all WebJars.
|
void |
extractWebJarTo(String name,
File to)
Extract the given WebJar to the given location.
|
protected static String |
getJsonModuleId(String packageJson) |
public static final String PACKAGE_JSON
public static final String BOWER_JSON
public WebJarExtractor()
public WebJarExtractor(@Nonnull ClassLoader classLoader)
public void extractAllWebJarsTo(@Nullable File to) throws IOException
to - The directory to extract toIOException - There was a problem extracting the WebJarspublic void extractWebJarTo(@Nullable String name, @Nullable File to) throws IOException
name - The name of the WebJar to extract.to - The location to extract it to. All WebJars will be merged into this location.IOException - There was a problem extracting the WebJarspublic void extractAllNodeModulesTo(@Nullable File to) throws IOException
to - The location to extract it to. All WebJars will be merged into this location.IOException - There was a problem extracting the WebJarspublic void extractAllBowerComponentsTo(@Nullable File to) throws IOException
to - The location to extract it to. All WebJars will be merged into this location.IOException - There was a problem extracting the WebJars@Nullable protected static String getJsonModuleId(@Nonnull String packageJson) throws IOException
IOExceptionCopyright © 2012–2023. All rights reserved.