Skip to content

node Functions

🛠️ Tools · ⬅ Home


Environment variables: NODE_PACKAGE_MANAGER

Usage

nodeInstall

Install nodejs

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

Usage

nodeUninstall

Uninstall nodejs

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

node Package Manager Utilities

Usage

nodePackageManagerInstall

Installs the selected package manager for node

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

Usage

nodePackageManagerUninstall

Installs the selected package manager for node

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

Usage

nodePackageManagerValid [ --help ] managerName

Is the passed node package manager name valid? Without arguments, shows the valid package manager names.

Arguments

  • --help - Flag. Optional. Display this help.
  • managerName - String. Required. The node package manager name to check.

Return codes

  • 0 - Yes, it's a valid package manager name.
  • 1 - No, it's not a valid package manager name.

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.

Arguments

  • action - String. Optional. Action to perform: install run update uninstall
  • ... - Arguments. Required. Passed to the node package manager. Required. when action is provided.

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

node Package Manager yarn

Environment variables: BUILD_YARN_VERSION

Usage

yarnInstall [ --version versionCode ] [ --help ]

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.

Arguments

  • --version versionCode - String. Optional. Install this version of yarn.
  • --help - Flag. Optional. Display this help.

Return codes

  • 1 - If installation of yarn fails
  • 0 - If yarn is already installed or installed without error

Environment

    • `BUILD_YARN_VERSION

node Package Manager npm

Environment variables: BUILD_NPM_VERSION

Usage

npmInstall [ --version versionCode ]

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.

Arguments

  • --version versionCode - String. Optional. Install this version of python.

Return codes

  • 1 - If installation of npm fails
  • 0 - If npm is already installed or installed without error

Environment

  • BUILD_NPM_VERSION - String. Version of npm to install using native npm binary.
  • Read-only. Default version. If not specified, uses latest.
    • BUILD_NPM_VERSION - String. Default to latest. Used to install npm -i npm@$BUILD_NPM_VERSION on install.