NodeNpmHelper

Helper class for easily launching Node.js scripts with required NPM modules.

Parameters

node

the Node.js wrapper

npm

the NPM wrapper

Constructors

Link copied to clipboard
constructor(node: NodeJsWrapper, npm: NpmWrapper)

Functions

Link copied to clipboard
fun launch(vararg requiredModules: NodeModule, action: () -> Unit)

Checks if the Node.js and NPM wrappers are present and valid, links, and optionally installs, the required modules, runs the given action and cleans up the working directory from generated files.