Module: BinInstall::Yarn

Defined in:
lib/bin_install/yarn.rb

Class Method Summary collapse

Class Method Details

.installObject



3
4
5
6
7
# File 'lib/bin_install/yarn.rb', line 3

def self.install
  puts 'Installing Yarn...'.white
  Brew::Package.install_or_upgrade('yarn')
  system('yarn install')
end

.install!Object



9
10
11
12
13
# File 'lib/bin_install/yarn.rb', line 9

def self.install!
  puts 'Installing Yarn...'.white
  Brew::Package.install_or_upgrade!('yarn')
  BinInstall.system!('yarn install')
end

.installed?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/bin_install/yarn.rb', line 23

def self.installed?
  Shell.executable_exists?('yarn')
end

.upgradeObject



15
16
17
# File 'lib/bin_install/yarn.rb', line 15

def self.upgrade
  system('yarn upgrade')
end

.upgrade!Object



19
20
21
# File 'lib/bin_install/yarn.rb', line 19

def self.upgrade!
  BinInstall.system!('yarn upgrade')
end