Description Public fields Methods Examples
Create and interact with npm.
bin
Path to npm bin directory.
new()
Npm$new(bin = NULL)
bin
Path to npm bin directory.
Initialise npm
\dontrun{Npm$new()}
cmd()
Npm$cmd(command, ...)
command
Command to execute.
...
Additional arguments and flags.
Execute command
\dontrun{Npm$new()$cmd("ls")}
install()
Npm$install(package = NULL, global = FALSE)
package
Name of npm package to install. If NULL
install dependencies from lock file.
global
Whether to install globally.
Install packages
\dontrun{Npm$new()$install("browserify")}
uninstall()
Npm$uninstall(package = NULL, global = FALSE)
package
Name of npm package to install. If NULL
install dependencies from lock file.
global
Whether to install globally.
Uninstall packages
\dontrun{Npm$new()$install("browserify")}
clone()
The objects of this class are cloneable with this method.
Npm$clone(deep = FALSE)
deep
Whether to make a deep clone.
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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.