|
|
|
@ -2,9 +2,13 @@ module Docs
|
|
|
|
|
class Typescript < UrlScraper
|
|
|
|
|
self.name = 'TypeScript'
|
|
|
|
|
self.type = 'simple'
|
|
|
|
|
self.release = '4.1.2'
|
|
|
|
|
self.base_url = 'https://www.typescriptlang.org/docs/handbook/'
|
|
|
|
|
self.root_path = 'index.html'
|
|
|
|
|
self.release = '4.1.3'
|
|
|
|
|
self.base_url = 'https://www.typescriptlang.org/'
|
|
|
|
|
self.root_path = 'docs/handbook/index.html'
|
|
|
|
|
self.initial_paths = [
|
|
|
|
|
'tsconfig/'
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
self.links = {
|
|
|
|
|
home: 'https://www.typescriptlang.org',
|
|
|
|
|
code: 'https://github.com/Microsoft/TypeScript'
|
|
|
|
@ -15,14 +19,24 @@ module Docs
|
|
|
|
|
options[:container] = 'main'
|
|
|
|
|
|
|
|
|
|
options[:skip] = [
|
|
|
|
|
'react-&-webpack.html',
|
|
|
|
|
'docs/handbook/react-&-webpack.html'
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
options[:skip_patterns] = [
|
|
|
|
|
/2/,
|
|
|
|
|
/release-notes/,
|
|
|
|
|
/release-notes/
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
options[:only_patterns] = [
|
|
|
|
|
/docs\/handbook\//,
|
|
|
|
|
/tsconfig\//
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
options[:fix_urls] = -> (url) do
|
|
|
|
|
url.gsub!(/docs\/handbook\/index.html/, "index.html")
|
|
|
|
|
url
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
options[:attribution] = <<-HTML
|
|
|
|
|
© 2012-2020 Microsoft<br>
|
|
|
|
|
Licensed under the Apache License, Version 2.0.
|
|
|
|
@ -31,5 +45,6 @@ module Docs
|
|
|
|
|
def get_latest_version(opts)
|
|
|
|
|
get_latest_github_release('Microsoft', 'TypeScript', opts)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|