class Npm

Public Class Methods

bower_install() click to toggle source
# File lib/npm/npm.rb, line 16
def self.bower_install
    puts 'Failed to install bower components' unless system 'bower install'
end
global(packages) click to toggle source
# File lib/npm/npm.rb, line 3
def self.global(packages)
    if packages.length > 0
        packages.each do |package|
            puts "Installing #{package} globally"
            fail "Failed to install #{package}" unless system "sudo npm install -g #{package}"
        end
    end
end
install() click to toggle source
# File lib/npm/npm.rb, line 12
def self.install
    puts 'Failed to install npm dependencies' unless system 'sudo npm install'
end