express.rb 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. module Docs
  2. class Express < UrlScraper
  3. self.name = 'Express'
  4. self.type = 'express'
  5. self.base_url = 'https://expressjs.com/en/'
  6. self.initial_paths = %w(
  7. starter/installing.html
  8. guide/routing.html
  9. advanced/developing-template-engines.html )
  10. self.links = {
  11. home: 'https://expressjs.com/',
  12. code: 'https://github.com/strongloop/express/'
  13. }
  14. html_filters.push 'express/clean_html', 'express/entries', 'title'
  15. options[:title] = false
  16. options[:root_title] = 'Express'
  17. options[:only_patterns] = [
  18. /\Astarter/,
  19. /\Aguide/,
  20. /\Aadvanced/ ]
  21. options[:attribution] = <<-HTML
  22. &copy; 2017 StrongLoop, IBM, and other expressjs.com contributors.<br>
  23. Licensed under the Creative Commons Attribution-ShareAlike License v3.0.
  24. HTML
  25. version do
  26. self.release = '5.2.1'
  27. self.root_path = '5x/api.html'
  28. end
  29. version '4' do
  30. self.release = '4.21.2'
  31. self.root_path = '4x/api.html'
  32. end
  33. def get_latest_version(opts)
  34. get_npm_version('express', opts)
  35. end
  36. end
  37. end