Sha256: a801a4560ef3127b30469b230eead2a739e9664c07bf1108643e92ac53eb9e07

Contents?: true

Size: 507 Bytes

Versions: 7

Compression:

Stored size: 507 Bytes

Contents

module LearnOpen
  module DependencyInstallers
    class NodeInstaller < BaseInstaller
      def self.detect(lesson, location)
        File.exists?("#{lesson.to_path}/package.json")
      end

      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
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
learn-open-1.2.28 lib/learn_open/services/dependency_installers/node_package_installer.rb
learn-open-1.2.27 lib/learn_open/services/dependency_installers/node_package_installer.rb
learn-open-1.2.26 lib/learn_open/services/dependency_installers/node_package_installer.rb
learn-open-1.2.24 lib/learn_open/services/dependency_installers/node_package_installer.rb
learn-open-1.2.23 lib/learn_open/services/dependency_installers/node_package_installer.rb
learn-open-1.2.22 lib/learn_open/services/dependency_installers/node_package_installer.rb
learn-open-1.2.21 lib/learn_open/services/dependency_installers/node_package_installer.rb