Base ready
This commit is contained in:
11
ops/cookbooks/vendor/nodejs/recipes/npm_packages.rb
vendored
Normal file
11
ops/cookbooks/vendor/nodejs/recipes/npm_packages.rb
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
node['nodejs']['npm_packages'].each do |pkg|
|
||||
pkg_action = pkg.key?('action') ? pkg['action'] : :install
|
||||
f = npm_package "nodejs_npm-#{pkg['name']}-#{pkg_action}" do
|
||||
action :nothing
|
||||
package pkg['name']
|
||||
end
|
||||
pkg.each do |key, value|
|
||||
f.send(key, value) unless key == 'name' || key == 'action'
|
||||
end
|
||||
f.action(pkg_action)
|
||||
end if node['nodejs'].key?('npm_packages')
|
Reference in New Issue
Block a user