babel.rb 797 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. module Docs
  2. class Babel < UrlScraper
  3. self.type = 'simple'
  4. self.base_url = 'https://babeljs.io/docs/en/'
  5. self.release = '7.12.6'
  6. self.links = {
  7. home: 'https://babeljs.io/',
  8. code: 'https://github.com/babel/babel'
  9. }
  10. html_filters.push 'babel/clean_html', 'babel/entries'
  11. options[:trailing_slash] = true
  12. options[:skip_patterns] = [
  13. /usage/,
  14. /configuration/,
  15. /learn/,
  16. /v7-migration/,
  17. /v7-migration-api/,
  18. /editors/,
  19. /presets/,
  20. /caveats/,
  21. /faq/,
  22. /roadmap/
  23. ]
  24. options[:attribution] = <<-HTML
  25. &copy; 2020 Sebastian McKenzie<br>
  26. Licensed under the MIT License.
  27. HTML
  28. def get_latest_version(opts)
  29. get_latest_github_release('babel', 'babel', opts)
  30. end
  31. end
  32. end