From bca4178d6ada15e3ff99e47d2777f7a770b5dd1f Mon Sep 17 00:00:00 2001 From: Thibaut Courouble Date: Sun, 15 May 2016 08:35:19 -0400 Subject: [PATCH] Update React Native documentation (0.25) --- lib/docs/filters/react_native/clean_html.rb | 15 +++++++++++++++ lib/docs/scrapers/react_native.rb | 4 +++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 lib/docs/filters/react_native/clean_html.rb diff --git a/lib/docs/filters/react_native/clean_html.rb b/lib/docs/filters/react_native/clean_html.rb new file mode 100644 index 00000000..6f74ca31 --- /dev/null +++ b/lib/docs/filters/react_native/clean_html.rb @@ -0,0 +1,15 @@ +module Docs + class ReactNative + class CleanHtmlFilter < Filter + def call + if root_page? + css('#unsupported + div + center', '#unsupported + div', '#unsupported', '.toggler', 'center > img').remove + end + + css('center > .button', 'p:contains("short survey")').remove + + doc + end + end + end +end diff --git a/lib/docs/scrapers/react_native.rb b/lib/docs/scrapers/react_native.rb index c47afc35..aa4977fc 100644 --- a/lib/docs/scrapers/react_native.rb +++ b/lib/docs/scrapers/react_native.rb @@ -3,7 +3,7 @@ module Docs self.name = 'React Native' self.slug = 'react_native' self.type = 'react' - self.release = '0.24' + self.release = '0.25' self.base_url = 'https://facebook.github.io/react-native/docs/' self.root_path = 'getting-started.html' self.links = { @@ -11,6 +11,8 @@ module Docs code: 'https://github.com/facebook/react-native' } + html_filters.push 'react_native/clean_html' + options[:root_title] = 'React Native Documentation' options[:only_patterns] = nil options[:skip] = %w(