@groovy.transform.CompileStatic @SuppressWarnings(value: AbstractClassWithoutAbstractMethod) abstract class AbstractBaseNpmPackageJsonInstall<T extends BaseNodeJSExtension<T>, S extends BaseNpmExtension<T, S>> extends GenericNodeBaseTask<T, S>
Installs the packages as described by a package.json file
| Type | Name and description |
|---|---|
Iterable<String> |
additionalInstallArgs |
boolean |
productionOnlySet to true if only production dependencies should be installed. |
| Constructor and description |
|---|
protected AbstractBaseNpmPackageJsonInstall
() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
void |
additionalInstallArgs(String[] args)Adds more installation arguments |
|
void |
additionalInstallArgs(Iterable<String> args)Adds more installation arguments |
|
protected NpmPackageInstaller |
createPackageInstaller()Creates an actual installer. |
|
void |
exec() |
|
Iterable<String> |
getAdditionalInstallArgs()Customise installation via additional argument that are passed to npm install. |
|
abstract Provider<File> |
getHomeDirProvider()THe NPM home directory. |
|
protected abstract NpmPackageInstaller |
getNpmPackageInstaller()Returns the NPM packer installer instance. |
|
File |
getPackageJsonFile()The package.json file that this task will query. |
|
Provider<File> |
getPackageJsonFileProvider()The package.json file that this task will query. |
|
File |
getPackageLockFile()The executable-lock.json file that this task will create. |
|
Provider<File> |
getPackageLockFileProvider()The executable-lock.json file that this task will create. |
|
void |
setAdditionalInstallArgs(Iterable<String> args)Replace list of arguments with a new list. |
Set to true if only production dependencies should be installed.
Adds more installation arguments
args - One or more argumentsAdds more installation arguments
args - Iterable list of argumentsCreates an actual installer. The default method relies on getPackageJsonFileProvider not returning null.
Customise installation via additional argument that are passed to npm install.
THe NPM home directory.
Returns the NPM packer installer instance.
This method is called from task actionsand thus should be configuration cache safe.
The package.json file that this task will query.
The package.json file that this task will query.
The executable-lock.json file that this task will create.
The executable-lock.json file that this task will create.
Groovy Documentation