class LearnOpen::DependencyInstallers::NodeInstaller
Public Class Methods
detect(lesson, location)
click to toggle source
# File lib/learn_open/services/dependency_installers/node_package_installer.rb, line 4 def self.detect(lesson, location) File.exists?("#{lesson.to_path}/package.json") end
Public Instance Methods
run()
click to toggle source
# File lib/learn_open/services/dependency_installers/node_package_installer.rb, line 8 def run io.puts 'Installing npm dependencies...' case environment when LearnOpen::Environments::IDEEnvironment system_adapter.run_command("yarn install --no-lockfile") else system_adapter.run_command("npm install") end end