소스 검색

Update TypeScript documentation (5.8.2)

Remove MultipleBaseUrls.

Fixes #2455.
Simon Legner 9 달 전
부모
커밋
ab18909a01
1개의 변경된 파일7개의 추가작업 그리고 11개의 파일을 삭제
  1. 7 11
      lib/docs/scrapers/typescript.rb

+ 7 - 11
lib/docs/scrapers/typescript.rb

@@ -1,17 +1,10 @@
 module Docs
   class Typescript < UrlScraper
-    include MultipleBaseUrls
-
     self.name = 'TypeScript'
     self.type = 'typescript'
 
     self.root_path = 'docs/'
 
-    def initial_urls
-      [ 'https://www.typescriptlang.org/docs/handbook/',
-        'https://www.typescriptlang.org/tsconfig' ]
-    end
-
     self.links = {
       home: 'https://www.typescriptlang.org',
       code: 'https://github.com/Microsoft/TypeScript'
@@ -19,11 +12,17 @@ module Docs
 
     html_filters.push 'typescript/entries', 'typescript/clean_html', 'title'
 
+    options[:only_patterns] = [
+      /\Adocs\Z/,
+      /\Adocs\/handbook/,
+      /\Atsconfig/,
+    ]
     options[:skip_patterns] = [
       /\Abranding/,
       /\Acommunity/,
       /\Adocs\Z/,
       /\Atools/,
+      /react.*webpack/,
       /release-notes/,
       /dt\/search/,
       /play/
@@ -36,10 +35,7 @@ module Docs
 
     version do
       self.release = '5.8.2'
-      self.base_urls = [
-        'https://www.typescriptlang.org/docs/handbook/',
-        'https://www.typescriptlang.org/'
-      ]
+      self.base_url = 'https://www.typescriptlang.org/'
     end
 
     version '5.1' do