bun.rb 785 B

1234567891011121314151617181920212223242526272829303132
  1. module Docs
  2. class Bun < UrlScraper
  3. self.name = 'Bun'
  4. self.type = 'simple'
  5. self.slug = 'bun'
  6. self.links = {
  7. home: 'https://leafletjs.com/',
  8. code: 'https://github.com/oven-sh/bun'
  9. }
  10. self.release = '1.3.0'
  11. self.base_url = "https://bun.com/docs/"
  12. self.root_path = 'installation'
  13. html_filters.push 'bun/clean_html', 'bun/entries'
  14. # https://bun.com/docs/project/licensing
  15. options[:attribution] = <<-HTML
  16. &copy; bun.com, oven-sh, Jarred Sumner<br>
  17. Licensed under the MIT License.
  18. HTML
  19. options[:skip_patterns] = [/^project/]
  20. options[:fix_urls] = ->(url) do
  21. url.sub! %r{.md$}, ''
  22. url
  23. end
  24. def get_latest_version(opts)
  25. tags = get_github_tags('oven-sh', 'bun', opts)
  26. end
  27. end
  28. end