Update npm documentation (5.5.1)

pull/699/merge
Thibaut Courouble 7 years ago
parent 9337dd651a
commit 9d4c84ed31

@ -9,7 +9,7 @@ module Docs
css('meta', '.colophon').remove css('meta', '.colophon').remove
end end
css('a.deep-link[id]').each do |node| css('a.deep-link[id]', 'a.anchor[id]').each do |node|
node.parent['id'] = node['id'] node.parent['id'] = node['id']
node.remove node.remove
end end

@ -28,11 +28,11 @@ module Docs
when 'files/package.json' when 'files/package.json'
css('#page > h2').each_with_object [] do |node, entries| css('#page > h2').each_with_object [] do |node, entries|
next if node.content =~ /\A[A-Z]/ next if node.content =~ /\A[A-Z]/
entries << ["package.json: #{node.content}", node.at_css('.deep-link')['id']] entries << ["package.json: #{node.content}", node.at_css('.anchor')['id']]
end end
when 'misc/config' when 'misc/config'
css('h2:contains("Config Settings") ~ h3').map do |node| css('h2:contains("Config Settings") ~ h3').map do |node|
["config: #{node.content}", node.at_css('.deep-link')['id']] ["config: #{node.content}", node.at_css('.anchor')['id']]
end end
else else
[] []

@ -2,7 +2,7 @@ module Docs
class Npm < UrlScraper class Npm < UrlScraper
self.name = 'npm' self.name = 'npm'
self.type = 'npm' self.type = 'npm'
self.release = '5.4.1' self.release = '5.5.1'
self.base_url = 'https://docs.npmjs.com/' self.base_url = 'https://docs.npmjs.com/'
self.force_gzip = true self.force_gzip = true
self.links = { self.links = {

Loading…
Cancel
Save