class Bibliothecary::Parsers::Bower

Public Class Methods

mapping() click to toggle source
# File lib/bibliothecary/parsers/bower.rb, line 8
def self.mapping
  {
    match_filename("bower.json") => {
      kind: "manifest",
      parser: :parse_manifest,
    },
  }
end
parse_manifest(file_contents, options: {}) click to toggle source
# File lib/bibliothecary/parsers/bower.rb, line 19
def self.parse_manifest(file_contents, options: {}) # rubocop:disable Lint/UnusedMethodArgument
  json = JSON.parse(file_contents)
  map_dependencies(json, "dependencies", "runtime") +
  map_dependencies(json, "devDependencies", "development")
end