mirror of
https://github.com/freeCodeCamp/devdocs
synced 2024-11-16 19:48:10 +01:00
Update React Native documentation (0.29)
This commit is contained in:
parent
e4487c9a06
commit
aa0ba9a339
3 changed files with 12 additions and 5 deletions
|
@ -9,6 +9,7 @@ module Docs
|
|||
|
||||
REPLACE_TYPES = {
|
||||
'Quick Start' => 'Guides',
|
||||
'The Basics' => 'Getting Started',
|
||||
'apis' => 'APIs',
|
||||
'components' => 'Components'
|
||||
}
|
||||
|
@ -40,12 +41,12 @@ module Docs
|
|||
else
|
||||
entries = []
|
||||
|
||||
css('.props > .prop > .propTitle').each do |node| # react-native
|
||||
css('.props > .prop > .propTitle', '.props > .prop > .methodTitle').each do |node| # react-native
|
||||
name = node.children.find(&:text?).try(:content)
|
||||
next if name.blank?
|
||||
sep = node.content.include?('static') ? '.' : '#'
|
||||
name.prepend(self.name + sep)
|
||||
name << '()' if (n = node.css('.propType').last) && n.content.start_with?('(')
|
||||
name << '()' if node['class'].include?('methodTitle')
|
||||
id = node.at_css('.anchor')['name']
|
||||
entries << [name, id]
|
||||
end
|
||||
|
|
|
@ -6,7 +6,11 @@ module Docs
|
|||
css('#unsupported + div + center', '#unsupported + div', '#unsupported', '.toggler', 'center > img').remove
|
||||
end
|
||||
|
||||
css('center > .button', 'p:contains("short survey")').remove
|
||||
css('center > .button', 'p:contains("short survey")', 'iframe', '.embedded-simulator').remove
|
||||
|
||||
css('h4.methodTitle').each do |node|
|
||||
node.name = 'h3'
|
||||
end
|
||||
|
||||
doc
|
||||
end
|
||||
|
|
|
@ -3,7 +3,7 @@ module Docs
|
|||
self.name = 'React Native'
|
||||
self.slug = 'react_native'
|
||||
self.type = 'react'
|
||||
self.release = '0.28'
|
||||
self.release = '0.29'
|
||||
self.base_url = 'https://facebook.github.io/react-native/docs/'
|
||||
self.root_path = 'getting-started.html'
|
||||
self.links = {
|
||||
|
@ -19,7 +19,9 @@ module Docs
|
|||
options[:skip] = %w(
|
||||
videos.html
|
||||
transforms.html
|
||||
troubleshooting.html)
|
||||
troubleshooting.html
|
||||
more-resources.html
|
||||
)
|
||||
|
||||
options[:fix_urls] = ->(url) {
|
||||
url.sub! 'docs/docs', 'docs'
|
||||
|
|
Loading…
Reference in a new issue