Npm: Node Package Manager

Description Public fields Methods Examples

Description

Create and interact with npm.

Public fields

bin

Path to npm bin directory.

Methods

Public methods


Method new()

Usage
Npm$new(bin = NULL)
Arguments
bin

Path to npm bin directory.

Details

Initialise npm

Examples
\dontrun{Npm$new()}

Method cmd()

Usage
Npm$cmd(command, ...)
Arguments
command

Command to execute.

...

Additional arguments and flags.

Details

Execute command

Examples
\dontrun{Npm$new()$cmd("ls")}

Method install()

Usage
Npm$install(package = NULL, global = FALSE)
Arguments
package

Name of npm package to install. If NULL install dependencies from lock file.

global

Whether to install globally.

Details

Install packages

Examples
\dontrun{Npm$new()$install("browserify")}

Method uninstall()

Usage
Npm$uninstall(package = NULL, global = FALSE)
Arguments
package

Name of npm package to install. If NULL install dependencies from lock file.

global

Whether to install globally.

Details

Uninstall packages

Examples
\dontrun{Npm$new()$install("browserify")}

Method clone()

The objects of this class are cloneable with this method.

Usage
Npm$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## ------------------------------------------------
## Method `Npm$new`
## ------------------------------------------------

## Not run: Npm$new()

## ------------------------------------------------
## Method `Npm$cmd`
## ------------------------------------------------

## Not run: Npm$new()$cmd("ls")

## ------------------------------------------------
## Method `Npm$install`
## ------------------------------------------------

## Not run: Npm$new()$install("browserify")

## ------------------------------------------------
## Method `Npm$uninstall`
## ------------------------------------------------

## Not run: Npm$new()$install("browserify")

ColinFay/bubble documentation built on May 15, 2020, 1:47 p.m.