vitest.rb 897 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. module Docs
  2. class Vitest < UrlScraper
  3. self.name = 'Vitest'
  4. self.slug = 'vitest'
  5. self.type = 'simple'
  6. self.links = {
  7. home: 'https://vitest.dev/',
  8. code: 'https://github.com/vitest-dev/vitest'
  9. }
  10. options[:root_title] = 'Vitest'
  11. options[:download_images] = false
  12. options[:skip] = %w(blog)
  13. options[:attribution] = <<-HTML
  14. &copy; 2021-Present Anthony Fu<br>
  15. &copy; 2021-Present Matias Capeletto<br>
  16. Licensed under the MIT License.
  17. HTML
  18. self.initial_paths = %w(guide/)
  19. html_filters.push 'vitest/entries', 'vite/clean_html'
  20. version do
  21. self.release = '3.0.8'
  22. self.base_url = 'https://vitest.dev/'
  23. end
  24. version '2' do
  25. self.release = '2.1.9'
  26. self.base_url = 'https://v2.vitest.dev/'
  27. end
  28. def get_latest_version(opts)
  29. get_npm_version('vitest', opts)
  30. end
  31. end
  32. end