node Functions
Environment variables:
NODE_PACKAGE_MANAGER
nodeInstall
Install nodejs
Usage
nodeInstall
Install nodejs
Arguments
- none
Return codes
0- Success1- Environment error2- Argument error
nodeUninstall
Uninstall nodejs
Usage
nodeUninstall
Uninstall nodejs
Arguments
- none
Return codes
0- Success1- Environment error2- Argument error
node Package Manager Utilities
nodePackageManagerInstall
Installs the selected package manager for node
Usage
nodePackageManagerInstall
Installs the selected package manager for node
Arguments
- none
Return codes
0- Success1- Environment error2- Argument error
nodePackageManagerUninstall
Installs the selected package manager for node
Usage
nodePackageManagerUninstall
Installs the selected package manager for node
Arguments
- none
Return codes
0- Success1- Environment error2- Argument error
nodePackageManagerValid
Is the passed node package manager name valid?
Usage
nodePackageManagerValid [ --help ] managerName
Is the passed node package manager name valid? Without arguments, shows the valid package manager names. Return Code: 0 - Yes, it's a valid package manager name. Return Code: 1 - No, it's not a valid package manager name. Valid names are: npm yarn
Arguments
--help- Optional. Flag. Display this help.managerName- Required. String. The node package manager name to check.
Return codes
0- Success1- Environment error2- Argument error
nodePackageManager
Run an action using the current node package manager
Usage
nodePackageManager [ action ] ...
Run an action using the current node package manager Provides an abstraction to libraries to support any node package manager. Optionally will output the current node package manager when no arguments are passed. No-Argument: Outputs the current node package manager code name
Arguments
action- Optional. Action to perform: install run update uninstall...- Required. Arguments. Passed to the node package manager. Required when action is provided.
Return codes
0- Success1- Environment error2- Argument error
node Package Manager yarn
Environment variables:
BUILD_YARN_VERSION
yarnInstall
Install yarn in the build environment
Usage
yarnInstall version
Install yarn in the build environment
If this fails it will output the installation log.
When this tool succeeds the yarn binary is available in the local operating system.
Return Code: 1 - If installation of yarn fails
Return Code: 0 - If yarn is already installed or installed without error
Arguments
- none
Return codes
0- Success1- Environment error2- Argument error
Environment
- BUILD_YARN_VERSION - String. Version of yarn to install using
corepack - Read-only. Default version. If not specified, uses
latest. -
BUILD_YARN_VERSION- String. Default tolatest.
node Package Manager npm
Environment variables:
BUILD_NPM_VERSION
npmInstall
Install NPM in the build environment
Usage
npmInstall version
Install NPM in the build environment
If this fails it will output the installation log.
When this tool succeeds the npm binary is available in the local operating system.
Return Code: 1 - If installation of npm fails
Return Code: 0 - If npm is already installed or installed without error
Arguments
- none
Return codes
0- Success1- Environment error2- Argument error
Environment
- BUILD_NPM_VERSION - String. Version of npm to install using native
npmbinary. - Read-only. Default version. If not specified, uses
latest. -
BUILD_NPM_VERSION- String. Default tolatest. Used to installnpm -i npm@$BUILD_NPM_VERSIONon install.