| 12345678910111213141516171819202122232425262728293031323334 |
- module Docs
- class Typescript < UrlScraper
- self.name = 'TypeScript'
- self.type = 'simple'
- self.release = '3.1.6'
- self.base_url = 'https://www.typescriptlang.org/docs/'
- self.root_path = 'tutorial.html'
- self.links = {
- home: 'https://www.typescriptlang.org',
- code: 'https://github.com/Microsoft/TypeScript'
- }
- html_filters.push 'typescript/entries', 'typescript/clean_html'
- options[:container] = '#doc-content'
- options[:skip] = %w(home.html)
- options[:skip_link] = ->(node) { node.parent.parent['class'] == 'dropdown-menu' }
- options[:fix_urls] = ->(url) {
- url.sub!(/(\w+)\.md/) { "#{$1.downcase}.html" }
- url
- }
- options[:attribution] = <<-HTML
- © Microsoft and other contributors<br>
- Licensed under the Apache License, Version 2.0.
- HTML
- def get_latest_version(opts)
- get_latest_github_release('Microsoft', 'TypeScript', opts)
- end
- end
- end
|