@groovy.transform.CompileStatic @groovy.util.logging.Slf4j class NodeJSExtension extends BaseNodeJSExtension<NodeJSExtension> implements NodeJSExtensionMethods, org.ysb33r.grolifant5.api.core.runnable.ProvisionedExecMethods<NodeJSExecSpec>
Configure project defaults or task specifics for Node.js.
| Type | Name and description |
|---|---|
Provider<Boolean> |
provideResolveNodeByVersionA provider to whether the node executable is resolved by version. |
Provider<Boolean> |
provideSyncNodeVersionFromNvmRcA provider to whether the node version is synchronized form .nvmrc. |
| Constructor and description |
|---|
NodeJSExtension
(Project project)Constructs a new extension which is attached to the provided project. |
NodeJSExtension
(Task task)Constructs a new extension which is attached to the provided task. |
protected NodeJSExtension
(Task task, NodeJSExtension altProjectExt)Constructs a new extension which is attached to the provided task. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
NodeJSExecSpec |
createExecSpec()Create execution specification. |
|
void |
executableByNvmRc(Provider<File> nvmrc)Read the version from .nvmrc.
|
|
void |
executableByNvmrc()Read the version from .nvmrc.
|
|
void |
executableByPath(Object path)Locate an executable by a local path. |
|
void |
executableBySearchPath(Object baseName)Locate executable by searching the current environmental search path. |
|
void |
executableByVersion(Object version)Locate an executable by version, probably downloading it if not local. |
|
Provider<File> |
getNvmrcLocation().nvmrc location. |
|
boolean |
isResolveNodeByVersion()Indicates whether resolving node is by version. |
|
boolean |
isSyncNodeVersionFromNvmRc()Indicates whether the Node version is being synchronised from .nvmrc. |
A provider to whether the node executable is resolved by version.
Constructs a new extension which is attached to the provided project.
project - Project this extension is associated with.Constructs a new extension which is attached to the provided task.
project - Project this extension is associated with.Constructs a new extension which is attached to the provided task.
project - Project this extension is associated with.altProjectExt - Alternative extension which implements NodeJSExtension.Create execution specification.
Read the version from .nvmrc.
Only supports fixed versions, not open versions like node or lts/*.
nvmrc - Provider to the location of .nvmrc Read the version from .nvmrc.
Only supports fixed versions, not open versions like node or lts/*.
Assumes .nvmrc is at the npm homedirectory
Locate an executable by a local path.
path - Something resolvable to a File.Locate executable by searching the current environmental search path.
baseName - The base name of the executableLocate an executable by version, probably downloading it if not local.
version - Something resolvable to a string. .nvmrc location.
.nvmrc. Can be a null provider. Indicates whether resolving node is by version.
true if the version has been set. Indicates whether the Node version is being synchronised from .nvmrc.
true us linkage has been established.Groovy Documentation