node.rb 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. module Docs
  2. class Node < UrlScraper
  3. self.name = 'Node.js'
  4. self.slug = 'node'
  5. self.type = 'node'
  6. self.links = {
  7. home: 'https://nodejs.org/',
  8. code: 'https://github.com/nodejs/node'
  9. }
  10. html_filters.push 'node/clean_html', 'node/entries', 'title'
  11. options[:title] = false
  12. options[:root_title] = 'Node.js'
  13. options[:container] = '#apicontent'
  14. options[:skip] = %w(index.html all.html documentation.html synopsis.html)
  15. options[:attribution] = <<-HTML
  16. &copy; Joyent, Inc. and other Node contributors<br>
  17. Licensed under the MIT License.<br>
  18. Node.js is a trademark of Joyent, Inc. and is used with its permission.<br>
  19. We are not endorsed by or affiliated with Joyent.
  20. HTML
  21. version do
  22. self.release = '9.8.0'
  23. self.base_url = 'https://nodejs.org/dist/latest-v9.x/docs/api/'
  24. end
  25. version '8 LTS' do
  26. self.release = '8.10.0'
  27. self.base_url = 'https://nodejs.org/dist/latest-v8.x/docs/api/'
  28. end
  29. version '6 LTS' do
  30. self.release = '6.13.1'
  31. self.base_url = 'https://nodejs.org/dist/latest-v6.x/docs/api/'
  32. end
  33. version '4 LTS' do
  34. self.release = '4.8.7'
  35. self.base_url = 'https://nodejs.org/dist/latest-v4.x/docs/api/'
  36. end
  37. end
  38. end