Update Node.js documentation (11.1.0)

pull/929/head
Thibaut Courouble 6 years ago
parent 46e62a3c68
commit e648ff91de

@ -20,5 +20,8 @@
margin: 0 0 1em 1em; margin: 0 0 1em 1em;
@extend %label; @extend %label;
} }
.srclink { float: right; }
details > table { margin: 0; }
} }

@ -16,7 +16,7 @@ module Docs
css('pre').each do |node| css('pre').each do |node|
if lang = node.at_css('code')['class'] if lang = node.at_css('code')['class']
node['data-language'] = lang.remove('lang-') node['data-language'] = lang.remove(%r{lang(uage)?-})
end end
node.content = node.content node.content = node.content

@ -26,6 +26,7 @@ module Docs
def get_type def get_type
type = at_css('h1').content.strip type = at_css('h1').content.strip
type.remove! %r{\[.*\]}
REPLACE_TYPES[type] || "#{type.first.upcase}#{type[1..-1]}" REPLACE_TYPES[type] || "#{type.first.upcase}#{type[1..-1]}"
end end
@ -40,6 +41,7 @@ module Docs
klass = nil if node.name == 'h2' klass = nil if node.name == 'h2'
name = node.content.strip name = node.content.strip
name.remove! %r{\s*\[src\]}
# Skip constructors # Skip constructors
if name.start_with? 'new ' if name.start_with? 'new '

@ -23,12 +23,17 @@ module Docs
HTML HTML
version do version do
self.release = '10.9.0' self.release = '11.1.0'
self.base_url = 'https://nodejs.org/dist/latest-v11.x/docs/api/'
end
version '10 LTS' do
self.release = '10.13.0'
self.base_url = 'https://nodejs.org/dist/latest-v10.x/docs/api/' self.base_url = 'https://nodejs.org/dist/latest-v10.x/docs/api/'
end end
version '8 LTS' do version '8 LTS' do
self.release = '8.11.4' self.release = '8.12.0'
self.base_url = 'https://nodejs.org/dist/latest-v8.x/docs/api/' self.base_url = 'https://nodejs.org/dist/latest-v8.x/docs/api/'
end end

Loading…
Cancel
Save