vueuse.rb 837 B

1234567891011121314151617181920212223242526272829303132
  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! 'vueuse.org/use', 'vueuse.org/core/use'
  14. url
  15. end
  16. options[:attribution] = <<-HTML
  17. &copy; 2019-present Anthony Fu<br>
  18. Licensed under the MIT License.
  19. HTML
  20. self.release = '9.4.0'
  21. self.base_url = 'https://vueuse.org/'
  22. self.initial_paths = %w(functions.html)
  23. html_filters.push 'vueuse/entries', 'vite/clean_html', 'vueuse/clean_html'
  24. def get_latest_version(opts)
  25. get_npm_version('vueuse', opts)
  26. end
  27. end
  28. end