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
Licensed under the Apache License, Version 2.0. HTML def get_latest_version(opts) get_latest_github_release('Microsoft', 'TypeScript', opts) end end end