vueuse.rb 927 B

12345678910111213141516171819202122232425262728293031323334
  1. module Docs
  2. class Vueuse < UrlScraper
  3. self.name = 'VueUse'
  4. self.slug = 'vueuse'
  5. self.type = 'vueuse'
  6. self.links = {
  7. home: 'https://vueuse.org/',
  8. code: 'https://github.com/vueuse/vueuse'
  9. }
  10. options[:skip] = %w(add-ons contributing ecosystem)
  11. options[:skip_patterns] = [/index$/]
  12. options[:fix_urls] = ->(url) do
  13. url.sub! %r{/index$}, ''
  14. url.sub! 'vueuse.org/on', 'vueuse.org/core/on'
  15. url.sub! 'vueuse.org/use', 'vueuse.org/core/use'
  16. url
  17. end
  18. options[:attribution] = <<-HTML
  19. &copy; 2019-present Anthony Fu<br>
  20. Licensed under the MIT License.
  21. HTML
  22. self.release = '9.8.2'
  23. self.base_url = 'https://vueuse.org/'
  24. self.initial_paths = %w(functions.html)
  25. html_filters.push 'vueuse/entries', 'vite/clean_html', 'vueuse/clean_html'
  26. def get_latest_version(opts)
  27. get_npm_version('@vueuse/core', opts)
  28. end
  29. end
  30. end