Class: Drydock::Plugins::NPM

Inherits:
Base
  • Object
show all
Defined in:
lib/drydock/plugins/npm.rb

Instance Attribute Summary

Attributes inherited from Base

#project

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Drydock::Plugins::Base

Instance Method Details

#install(*pkgs) ⇒ Object



8
9
10
11
12
# File 'lib/drydock/plugins/npm.rb', line 8

def install(*pkgs)
  opts = pkgs.last.is_a?(Hash) ? pkgs.pop : {}
  flags = CliFlags.new(opts)
  project.run("npm install #{flags}#{pkgs.join(' ')}")
end