devdocs/lib/docs/scrapers/node.rb

46 lines
1.2 KiB
Ruby
Raw Normal View History

2013-10-24 20:25:52 +02:00
module Docs
class Node < UrlScraper
self.name = 'Node.js'
self.slug = 'node'
self.type = 'node'
2015-03-29 16:53:01 +02:00
self.links = {
home: 'https://nodejs.org/',
2015-11-01 16:56:45 +01:00
code: 'https://github.com/nodejs/node'
2015-03-29 16:53:01 +02:00
}
2013-10-24 20:25:52 +02:00
html_filters.push 'node/clean_html', 'node/entries', 'title'
2013-10-24 20:25:52 +02:00
options[:title] = false
options[:root_title] = 'Node.js'
options[:container] = '#apicontent'
options[:skip] = %w(index.html all.html documentation.html synopsis.html)
options[:attribution] = <<-HTML
2013-10-24 20:25:52 +02:00
&copy; Joyent, Inc. and other Node contributors<br>
2015-11-01 16:56:45 +01:00
Licensed under the MIT License.<br>
Node.js is a trademark of Joyent, Inc. and is used with its permission.<br>
We are not endorsed by or affiliated with Joyent.
2013-10-24 20:25:52 +02:00
HTML
version do
2018-05-14 02:32:46 +02:00
self.release = '10.1.0'
2018-04-28 16:22:26 +02:00
self.base_url = 'https://nodejs.org/dist/latest-v10.x/docs/api/'
2017-11-10 17:50:07 +01:00
end
version '8 LTS' do
2018-04-28 16:22:26 +02:00
self.release = '8.11.1'
2017-06-04 17:50:40 +02:00
self.base_url = 'https://nodejs.org/dist/latest-v8.x/docs/api/'
end
version '6 LTS' do
2018-03-18 16:35:00 +01:00
self.release = '6.13.1'
self.base_url = 'https://nodejs.org/dist/latest-v6.x/docs/api/'
end
version '4 LTS' do
2018-01-08 00:40:41 +01:00
self.release = '4.8.7'
self.base_url = 'https://nodejs.org/dist/latest-v4.x/docs/api/'
end
2013-10-24 20:25:52 +02:00
end
end