NpmWrapper

Wrapper for invoking the Node Package Manager, with functionalities for installing and linking NodeModules.

Parameters

path

path to the NPM executable

Constructors

Link copied to clipboard
constructor(path: String)

Types

Link copied to clipboard

Properties

Link copied to clipboard
open override val isValid: Boolean
Link copied to clipboard
open override val path: String
Link copied to clipboard
open override val workingDirectory: File? = null

Working directory to run the executable in. If null, the current working directory will be used.

Functions

Link copied to clipboard
fun install(module: NodeModule)

Installs a Node.js module globally, overwriting it if it already exists.

Link copied to clipboard
Link copied to clipboard
fun link(node: NodeJsWrapper, module: NodeModule)

Links a globally installed Node.js module to the project located in node's working directory.

Link copied to clipboard
fun unlink(node: NodeJsWrapper, module: NodeModule)

Unlinks a linked Node.js module from the project located in node's working directory.