1
0

deno.rb 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. module Docs
  2. class Deno < UrlScraper
  3. self.name = 'Deno'
  4. self.type = 'simple'
  5. self.links = {
  6. home: 'https://deno.com/',
  7. code: 'https://github.com/denoland/deno'
  8. }
  9. # https://github.com/denoland/manual/blob/main/LICENSE
  10. options[:attribution] = <<-HTML
  11. &copy; 2018–2024 the Deno authors<br>
  12. Licensed under the MIT License.
  13. HTML
  14. html_filters.push 'deno/entries', 'deno/clean_html'
  15. version '2' do
  16. self.release = '2.1.1'
  17. self.base_url = 'https://docs.deno.com/'
  18. self.root_path = 'runtime'
  19. options[:only_patterns] = [/\Aruntime/, /\Aapi\/deno\/~/, /\Adeploy/, /\Asubhosting/]
  20. options[:skip_patterns] = [
  21. /\Aruntime\/manual/,
  22. /\Aapi\/deno\/.+\.prototype\z/, # all prototype pages get redirected to the main page
  23. /\Aapi\/deno\/~\/Deno\.jupyter\.MediaBundle.+/, # docs unavailable
  24. /\Aapi\/deno\/~\/Deno\.OpMetrics/, # deprecated in deno 2
  25. ]
  26. options[:trailing_slash] = false
  27. end
  28. version '1' do
  29. self.release = '1.27.0'
  30. end
  31. def get_latest_version(opts)
  32. get_latest_github_release('denoland', 'deno', opts)
  33. end
  34. end
  35. end