Class: Bibliothecary::Parsers::Bower
- Inherits:
-
Object
- Object
- Bibliothecary::Parsers::Bower
- Includes:
- Analyser
- Defined in:
- lib/bibliothecary/parsers/bower.rb
Class Method Summary collapse
- .mapping ⇒ Object
-
.parse_manifest(file_contents, options: {}) ⇒ Object
rubocop:disable Lint/UnusedMethodArgument.
Methods included from Analyser
create_analysis, create_error_analysis, included
Class Method Details
.mapping ⇒ Object
8 9 10 11 12 13 14 15 |
# 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: {}) ⇒ Object
rubocop:disable Lint/UnusedMethodArgument
19 20 21 22 23 |
# 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 |