npm
— NPM packages
The npm
check examines the local NPM package database, and inserts that global packages are installed or missing.
It checks global packages, rather than packages specific to a particular package.json
.
Examples
Check that a package is installed:
[[npm]] package = 'yarn'
Check that a particular version is installed:
[[npm]] package = 'typescript' version = '3.6.4'
Check that a package is not installed:
[[npm]] package = 'express' state = 'missing'
List of parameters
parameter | structure | description |
---|---|---|
package | string | Name of the package. |
state | string | State of the package. This can be 'present' or 'missing' . |
version | string | If installed, the version that should be present. |