Sha256: 08f20265ccbdd6311b34774795952305b06e9d936aa9ede5ec640ed6b8866748

Contents?: true

Size: 805 Bytes

Versions: 2

Compression:

Stored size: 805 Bytes

Contents

module LicenseFinder
  class NpmPackage < Package
    def initialize(node_module, options={})
      super options
      @node_module = node_module
    end

    def name
      node_module["name"]
    end

    def version
      node_module["version"]
    end

    def summary
      node_module["description"]
    end

    def description
      node_module["readme"]
    end

    def homepage
      node_module["homepage"]
    end

    def children
      [] # no way to determine child deps from npm (maybe?)
    end

    def groups
      [] # no concept of dev/test groups in npm (maybe?)
    end

    private

    attr_reader :node_module

    def install_path
      node_module["path"]
    end

    def license_names_from_spec
      Package.license_names_from_standard_spec(node_module)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
license_finder-1.2 lib/license_finder/package_managers/npm_package.rb
license_finder-1.2-java lib/license_finder/package_managers/npm_package.rb