public class WebJarPackage extends Object
ArtifactData that holds information about a package located in the corresponding WebJar.| Constructor and Description |
|---|
WebJarPackage(ArtifactData webJar,
String packageName,
String pathToPackage)
Creates new wrapper instance.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getPackageName()
Gets the name of the package in the WebJar.
|
String |
getPathToPackage()
Gets path to package that in the WebJar.
|
ArtifactData |
getWebJar()
Gets the WebJar that holds the package.
|
static WebJarPackage |
selectCorrectPackage(WebJarPackage package1,
WebJarPackage package2)
Attempts to select correct package out of two WebJar package data, resolving common WebJar issues:
https://github.com/webjars/webjars/issues/1656
https://github.com/webjars/webjars/issues/1452
|
public WebJarPackage(ArtifactData webJar, String packageName, String pathToPackage)
webJar - the WebJar that holds the package in, not nullpackageName - name of a package inside the WebJar, not nullpathToPackage - path to package inside the WebJar, not nullpublic ArtifactData getWebJar()
public String getPackageName()
public String getPathToPackage()
public static WebJarPackage selectCorrectPackage(WebJarPackage package1, WebJarPackage package2)
Versions of the parent packages are considered, even if they are different from the package's one. The reason for this is: bower.json version field deprecation notes
package1 - first package datapackage2 - second package dataIllegalArgumentException - when packages have different names or versionsCopyright © 2000–2022 Vaadin Ltd. All rights reserved.