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
Bootstraps a node.js application.
Will execute 'npm install --json' on the specified directory.
The user to run NPM with
New in version 0.17.0.
Ensure that the given package is not cached.
If no package is specified, this ensures the entire cache is cleared.
Force cleaning of cache. Required for [email protected] and greater
New in version 2016.11.6.
Verify that the given package is installed and is at the correct version (if specified).
coffee-script: npm.installed: - user: someuser [email protected]: npm.installed: []
The package to install
Changed in version 2014.7.2: This parameter is no longer lowercased by salt so that case-sensitive NPM package names will work.
A list of packages to install with a single npm invocation; specifying this argument will ignore the name
argument
New in version 2014.7.0.
The user to run NPM with
New in version 0.17.0.
The NPM registry from which to install the package
New in version 2014.7.0.
A list of environment variables to be set prior to execution. The format is the same as the cmd.run
. state function.
New in version 2014.7.0.
Verify that the given package is not installed.
The user to run NPM with
New in version 0.17.0.
© 2019 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltstack.com/en/latest/ref/states/all/salt.states.npm.html