@groovy.transform.CompileStatic class NpmDependency extends Object implements NpmPackageDescriptor
Creates an NPM dependency
| Modifiers | Name | Description |
|---|---|---|
protected static java.util.List<String> |
VALID_KEYS |
| Constructor and description |
|---|
NpmDependency
(String name, String version) |
NpmDependency
(String scope, String name, String version) |
NpmDependency
(java.util.Map<String, ?> props)Allows additional parameters to be set |
| Type Params | Return Type | Name and description |
|---|---|---|
|
NpmDependencyGroup |
getInstallGroup()NPM installation group |
|
String |
getNpmPackageCoordinates() |
|
String |
getPackageName()Name of the package without tags |
|
String |
getScope()Package scope |
|
String |
getTagName()Name of NPM tag |
|
static java.util.Map<String, Object> |
onlyNpmDependencyKeys(java.util.Map<String, Object> userMap)Extracts only the keys for NpmDependency that are valid. |
Allows additional parameters to be set
scope - The scope if needed
name - The package name
tag - The tag/version
type - One of prod, dev, optional
props - Dependency propertiesNPM installation group