typescript.rb 851 B

1234567891011121314151617181920212223242526272829303132333435
  1. module Docs
  2. class Typescript < UrlScraper
  3. self.name = 'TypeScript'
  4. self.type = 'simple'
  5. self.release = '4.1.2'
  6. self.base_url = 'https://www.typescriptlang.org/docs/handbook/'
  7. self.root_path = 'index.html'
  8. self.links = {
  9. home: 'https://www.typescriptlang.org',
  10. code: 'https://github.com/Microsoft/TypeScript'
  11. }
  12. html_filters.push 'typescript/entries', 'typescript/clean_html', 'title'
  13. options[:container] = 'main'
  14. options[:skip] = [
  15. 'react-&-webpack.html',
  16. ]
  17. options[:skip_patterns] = [
  18. /2/,
  19. /release-notes/,
  20. ]
  21. options[:attribution] = <<-HTML
  22. &copy; 2012-2020 Microsoft<br>
  23. Licensed under the Apache License, Version 2.0.
  24. HTML
  25. def get_latest_version(opts)
  26. get_latest_github_release('Microsoft', 'TypeScript', opts)
  27. end
  28. end
  29. end