History

Update TypeScript documentation (5.8.2)

Remove MultipleBaseUrls. Fixes #2455.

Simon Legner committed 1 year ago

Commit ab189091 parent 13e3a2d1 file · +7 −11Browse files

Unified · Split

lib/docs/scrapers/typescript.rb+7−11
@@ -1,17 +1,10 @@
11 module Docs
22 class Typescript < UrlScraper
3− include MultipleBaseUrls
4−
53 self.name = 'TypeScript'
64 self.type = 'typescript'
75
86 self.root_path = 'docs/'
97
10− def initial_urls
11− [ 'https://www.typescriptlang.org/docs/handbook/',
12− 'https://www.typescriptlang.org/tsconfig' ]
13− end
14−
158 self.links = {
169 home: 'https://www.typescriptlang.org',
1710 code: 'https://github.com/Microsoft/TypeScript'
@@ -19,11 +12,17 @@ module Docs · 1 unmodified line
1912
2013 html_filters.push 'typescript/entries', 'typescript/clean_html', 'title'
2114
15+ options[:only_patterns] = [
16+ /\Adocs\Z/,
17+ /\Adocs\/handbook/,
18+ /\Atsconfig/,
19+ ]
2220 options[:skip_patterns] = [
2321 /\Abranding/,
2422 /\Acommunity/,
2523 /\Adocs\Z/,
2624 /\Atools/,
25+ /react.*webpack/,
2726 /release-notes/,
2827 /dt\/search/,
2928 /play/
@@ -36,10 +35,7 @@ module Docs · 6 unmodified lines
3635
3736 version do
3837 self.release = '5.8.2'
39− self.base_urls = [
40− 'https://www.typescriptlang.org/docs/handbook/',
41− 'https://www.typescriptlang.org/'
42− ]
38+ self.base_url = 'https://www.typescriptlang.org/'
4339 end
4440
4541 version '5.1' do