|
@@ -7,6 +7,19 @@ module Docs
|
|
|
code: 'https://github.com/facebook/react'
|
|
code: 'https://github.com/facebook/react'
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ version do
|
|
|
|
|
+ self.release = '18.3.1'
|
|
|
|
|
+ # TODO add /learn
|
|
|
|
|
+ self.base_url = 'https://react.dev/reference'
|
|
|
|
|
+
|
|
|
|
|
+ html_filters.push 'react/entries_react_dev', 'react/clean_html_react_dev'
|
|
|
|
|
+
|
|
|
|
|
+ options[:attribution] = <<-HTML
|
|
|
|
|
+ © 2013–present Facebook Inc.<br>
|
|
|
|
|
+ Licensed under the Creative Commons Attribution 4.0 International Public License.
|
|
|
|
|
+ HTML
|
|
|
|
|
+ end
|
|
|
|
|
+
|
|
|
version '17' do
|
|
version '17' do
|
|
|
self.release = '17.0.2'
|
|
self.release = '17.0.2'
|
|
|
self.base_url = 'https://17.reactjs.org/docs/'
|
|
self.base_url = 'https://17.reactjs.org/docs/'
|
|
@@ -33,7 +46,6 @@ module Docs
|
|
|
HTML
|
|
HTML
|
|
|
end
|
|
end
|
|
|
|
|
|
|
|
-
|
|
|
|
|
def get_latest_version(opts)
|
|
def get_latest_version(opts)
|
|
|
doc = fetch_doc('https://react.dev/', opts)
|
|
doc = fetch_doc('https://react.dev/', opts)
|
|
|
doc.at_css('a[href="/versions"]').content.strip[1..-1]
|
|
doc.at_css('a[href="/versions"]').content.strip[1..-1]
|