Skip to content

node Functions

🛠️ Tools · ⬅ Home


nodeInstall

Install nodejs

Usage

nodeInstall

Install nodejs

Arguments

  • none

Return codes

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

nodeUninstall

Uninstall nodejs

Usage

nodeUninstall

Uninstall nodejs

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - 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 - Success
  • 1 - Environment error
  • 2 - Argument error

nodePackageManagerUninstall

Installs the selected package manager for node

Usage

nodePackageManagerUninstall

Installs the selected package manager for node

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - 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.

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.

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.

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

yarnInstall

Install yarn in the build environment

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. Defaults to stable if BUILD_YARN_VERSION is blank or unset.
  • --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

npmInstall

Install NPM in the build environment

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

  • {SEE:BUILD_NPM_VERSION.sh} - 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.

🛠️ Tools · ⬅ Top