svelte.rb 867 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. module Docs
  2. class Svelte < UrlScraper
  3. self.name = 'Svelte'
  4. self.slug = 'svelte'
  5. self.type = 'simple'
  6. self.root_path = '/'
  7. self.links = {
  8. home: 'https://svelte.dev/',
  9. code: 'https://github.com/sveltejs/svelte'
  10. }
  11. options[:root_title] = 'Svelte'
  12. # https://github.com/sveltejs/svelte/blob/master/LICENSE.md
  13. options[:attribution] = <<-HTML
  14. &copy; 2016–2025 Rich Harris and contributors<br>
  15. Licensed under the MIT License.
  16. HTML
  17. self.base_url = 'https://svelte.dev/docs/svelte/'
  18. html_filters.push 'svelte/entries', 'svelte/clean_html'
  19. version do
  20. self.release = '5.33.11'
  21. end
  22. version '4' do
  23. self.release = '4.2.1'
  24. end
  25. version '3' do
  26. self.release = '3.55.0'
  27. end
  28. def get_latest_version(opts)
  29. get_npm_version('svelte', opts)
  30. end
  31. end
  32. end