File tree 2 files changed +14
-6
lines changed
2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -9,10 +9,9 @@ def get_name
9
9
end
10
10
11
11
def get_type
12
- name = at_css ( 'h1' ) . content
13
- name . sub! %r{\s *#\s *} , ''
14
- name . sub! %r{\s *\u200B \s *} , ''
15
- name
12
+ return 'browser' if slug . starts_with? ( 'guide/browser' )
13
+ return 'cli' if slug . starts_with? ( 'guide/cli' )
14
+ return slug . split ( '/' ) . first
16
15
end
17
16
18
17
def additional_entries
Original file line number Diff line number Diff line change @@ -10,17 +10,26 @@ class Vitest < UrlScraper
10
10
11
11
options [ :root_title ] = 'Vitest'
12
12
options [ :download_images ] = false
13
+ options [ :skip ] = %w( blog )
13
14
14
15
options [ :attribution ] = <<-HTML
15
16
© 2021-Present Anthony Fu< br >
16
17
© 2021-Present Matias Capeletto< br >
17
18
Licensed under the MIT License.
18
19
HTML
19
20
20
- self . release = '2.0.3'
21
- self . base_url = 'https://vitest.dev/'
22
21
self . initial_paths = %w( guide/ )
23
22
html_filters . push 'vitest/entries' , 'vite/clean_html'
23
+
24
+ version do
25
+ self . release = '3.0.8'
26
+ self . base_url = 'https://vitest.dev/'
27
+ end
28
+
29
+ version '2' do
30
+ self . release = '2.1.9'
31
+ self . base_url = 'https://v2.vitest.dev/'
32
+ end
24
33
25
34
def get_latest_version ( opts )
26
35
get_npm_version ( 'vitest' , opts )
You can’t perform that action at this time.
0 commit comments