@@ -2,37 +2,40 @@ module Docs
22 class React < UrlScraper
33 self . name = 'React'
44 self . type = 'simple'
5- self . release = '18.2.0'
6- self . base_url = 'https://reactjs.org/docs/'
7- self . root_path = 'hello-world.html'
85 self . links = {
9- home : 'https://reactjs.org /' ,
6+ home : 'https://react.dev /' ,
107 code : 'https://github.com/facebook/react'
118 }
129
13- html_filters . push 'react/entries' , 'react/clean_html'
10+ version '17' do
11+ self . release = '17.0.2'
12+ self . base_url = 'https://17.reactjs.org/docs/'
13+ self . root_path = 'hello-world.html'
14+ html_filters . push 'react/entries' , 'react/clean_html'
1415
15- options [ :skip ] = %w(
16- codebase-overview.html
17- design-principles.html
18- how-to-contribute.html
19- implementation-notes.html
20- )
16+ options [ :skip ] = %w(
17+ codebase-overview.html
18+ design-principles.html
19+ how-to-contribute.html
20+ implementation-notes.html
21+ )
2122
22- options [ :replace_paths ] = {
23- 'more-about-refs.html' => 'refs-and-the-dom.html' ,
24- 'interactivity-and-dynamic-uis.html' => 'state-and-lifecycle.html' ,
25- 'working-with-the-browser.html' => 'refs-and-the-dom.html' ,
26- 'top-level-api.html' => 'react-api.html' ,
27- }
23+ options [ :replace_paths ] = {
24+ 'more-about-refs.html' => 'refs-and-the-dom.html' ,
25+ 'interactivity-and-dynamic-uis.html' => 'state-and-lifecycle.html' ,
26+ 'working-with-the-browser.html' => 'refs-and-the-dom.html' ,
27+ 'top-level-api.html' => 'react-api.html' ,
28+ }
29+
30+ options [ :attribution ] = <<-HTML
31+ © 2013–present Facebook Inc.< br >
32+ Licensed under the Creative Commons Attribution 4.0 International Public License.
33+ HTML
34+ end
2835
29- options [ :attribution ] = <<-HTML
30- © 2013–present Facebook Inc.< br >
31- Licensed under the Creative Commons Attribution 4.0 International Public License.
32- HTML
3336
3437 def get_latest_version ( opts )
35- doc = fetch_doc ( 'https://reactjs.org/docs/getting-started.html ' , opts )
38+ doc = fetch_doc ( 'https://react.dev/ ' , opts )
3639 doc . at_css ( 'a[href="/versions"]' ) . content . strip [ 1 ..-1 ]
3740 end
3841 end
0 commit comments