Defined Type: npm::update
- Defined in:
- puppet/modules/npm/manifests/update.pp
Overview
Define: npm::update
Custom resource for installing / updating node.js module dependencies
Parameters
- directory
-
Name of the directory where to execute the install/update
- unless
-
Condition to use to test if the update should be executed
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'puppet/modules/npm/manifests/update.pp', line 13
define npm::update(
$directory,
$unless = undef,
) {
require ::npm
exec { "${title}_npm_install":
command => '/usr/bin/npm update --no-bin-links',
cwd => $directory,
user => 'vagrant',
environment => [
"NPM_CONFIG_CACHE=${::npm::cache_dir}",
'NPM_CONFIG_GLOBAL=false',
'LINK=g++',
'HOME=/home/vagrant',
],
unless => $unless,
}
}
|