@groovy.transform.CompileStatic @groovy.util.logging.Slf4j class NodeJSExtension extends BaseNodeJSExtension
Configure project defaults or task specifics for Node.js.
| Modifiers | Name | Description |
|---|---|---|
static java.lang.String |
NAME |
|
static java.lang.String |
NODEJS_DEFAULT |
The default version of Node.js that will be used on a supported platform if nothing else is configured. |
| Fields inherited from class | Fields |
|---|---|
class BaseNodeJSExtension |
NODEJS_DEFAULT, locateNpm |
| Constructor and description |
|---|
NodeJSExtension
(org.gradle.api.Project project)Constructs a new extension which is attached to the provided project. |
NodeJSExtension
(org.gradle.api.Task task)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(org.gradle.api.provider.Provider<java.io.File> nvmrc)Read the version from .nvmrc.
|
|
void |
executableByNvmrc()Read the version from .nvmrc.
|
|
void |
executableByPath(java.lang.Object path)Locate an executable by a local path. |
|
void |
executableBySearchPath(java.lang.Object baseName)Locate executable by searching the current environmental search path. |
|
void |
executableByVersion(java.lang.Object version)Locate an executable by version, probably downloading it if not local. |
|
org.gradle.api.provider.Provider<java.io.File> |
getNvmrcLocation().nvmrc location. |
|
boolean |
isResolveNodeByVersion()Indicates whether resolving node is by version. |
|
boolean |
isSyncNodeVersionFromNvmRc()Indicates whether the Node version is being syncronised from .nvmrc. |
| Methods inherited from class | Name |
|---|---|
class BaseNodeJSExtension |
appendPath, environment, getDownloader, getEnvironment, getNpmCliJsProvider, prefixPath, runExecutableAndReturnVersion, setEnvironment, useSystemPath |
The default version of Node.js that will be used on a supported platform if nothing else is configured.
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.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 java.io.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 syncronised from .nvmrc.
true us linkage has been established.