Class: NpmCommands
- Inherits:
-
Object
- Object
- NpmCommands
- Defined in:
- lib/npm_commands.rb
Instance Method Summary collapse
Instance Method Details
#install(*args) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/npm_commands.rb', line 4 def install(*args) STDERR.puts 'Installing npm dependencies...' install_status = Dir.chdir File.('..', File.dirname(__FILE__)) do system('npm', 'install', *args) end STDERR.puts( *if install_status ['npm dependencies installed'] else ['-' * 60, 'Error: npm dependencies installation failed', '-' * 60] end ) install_status end |