salt.states.npm¶
Installation of NPM Packages¶
These states manage the installed packages for node.js using the Node Package
Manager (npm). Note that npm must be installed for these states to be
available, so npm states should include a requisite to a pkg.installed state
for the package which provides npm (simply npm
in most cases). Example:
npm:
pkg.installed
yaml:
npm.installed:
- require:
- pkg: npm
-
salt.states.npm.
bootstrap
(name, runas=None, user=None)¶ Bootstraps a node.js application.
will execute npm install --json on the specified directory
- runas
The user to run NPM with
Deprecated since version 0.17.0.
- user
The user to run NPM with
New in version 0.17.0.
-
salt.states.npm.
installed
(name, dir=None, runas=None, user=None, force_reinstall=False, **kwargs)¶ Verify that the given package is installed and is at the correct version (if specified).
- dir
- The target directory in which to install the package, or None for global installation
- runas
The user to run NPM with
Deprecated since version 0.17.0.
- user
The user to run NPM with
New in version 0.17.0.
- force_reinstall
- Install the package even if it is already installed
-
salt.states.npm.
removed
(name, dir=None, runas=None, user=None, **kwargs)¶ Verify that the given package is not installed.
- dir
- The target directory in which to install the package, or None for global installation
- runas
The user to run NPM with
Deprecated since version 0.17.0.
- user
The user to run NPM with
New in version 0.17.0.