1
0

svelte.rb 861 B

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