History

Merge pull request #1641 from freeCodeCamp/vue-3.2

Update Vue.js documentation

Simon Legner committed 5 years ago

Commit c2f420a2 parents 10448a0 49d182d6 files · +19 −9Browse files

Unified · Split

6 files
  1. lib/docs/filters/vue/clean_html.rb +9 −0
  2. lib/docs/filters/vue_router/entries.rb +3 −3
  3. lib/docs/filters/vuex/entries.rb +3 −3
  4. lib/docs/scrapers/vue.rb +2 −1
  5. lib/docs/scrapers/vue_router.rb +1 −1
  6. lib/docs/scrapers/vuex.rb +1 −1
lib/docs/filters/vue/clean_html.rb+9−0
@@ -14,6 +14,15 @@ module Docs · 13 unmodified lines
1414 node.name = 'strong'
1515 end
1616
17+ # Remove CodePen div
18+ css('.codepen').each do |node|
19+ next if node.previous_element.nil?
20+ span = node.css('span:contains("See the Pen")').remove
21+ node.previous_element.add_child(' ')
22+ node.previous_element.add_child(span)
23+ node.remove
24+ end
25+
1726 # Remove code highlighting
1827 css('figure').each do |node|
1928 node.name = 'pre'
lib/docs/filters/vue_router/entries.rb+3−3
@@ -3,7 +3,7 @@ module Docs · 2 unmodified lines
33 class EntriesFilter < Docs::EntriesFilter
44 def get_name
55 name = at_css('h1').content
6− name.remove! '# '
6+ name.sub! %r{#\s*}, ''
77 name
88 end
99
@@ -34,9 +34,9 @@ module Docs · 24 unmodified lines
3434 title = node
3535 title = title.previous_element until title.name == 'h2'
3636 title = title.content.strip
37− title.remove! '# '
37+ title.sub! %r{#\s*}, ''
3838
39− entry_name.remove! '# '
39+ entry_name.sub! %r{#\s*}, ''
4040
4141 case title
4242 when 'Router Construction Options'
lib/docs/filters/vuex/entries.rb+3−3
@@ -4,7 +4,7 @@ module Docs · 3 unmodified lines
44 def get_name
55 name = at_css('h1').content
66
7− name.remove! '# '
7+ name.sub! %r{#\s*}, ''
88
99 # Add index on guides
1010 unless subpath.start_with?('api')
@@ -42,9 +42,9 @@ module Docs · 31 unmodified lines
4242 title = node
4343 title = title.previous_element until title.name == 'h2'
4444 title = title.content.strip
45− title.remove! '# '
45+ title.sub! %r{#\s*}, ''
4646
47− entry_name.remove! '# '
47+ entry_name.sub! %r{#\s*}, ''
4848
4949 unless entry_name.start_with?('router.')
5050 case title
lib/docs/scrapers/vue.rb+2−1
@@ -10,6 +10,7 @@ module Docs · 9 unmodified lines
1010
1111 options[:only_patterns] = [/guide\//, /api\//]
1212 options[:skip] = %w(guide/team.html)
13+ options[:skip_patterns] = [/guide\/contributing/]
1314 options[:replace_paths] = { 'guide/' => 'guide/index.html' }
1415
1516 options[:attribution] = <<-HTML
@@ -18,7 +19,7 @@ module Docs · 2 unmodified lines
1819 HTML
1920
2021 version '3' do
21− self.release = '3.2.4'
22+ self.release = '3.2.20'
2223 self.base_url = 'https://v3.vuejs.org/'
2324 self.root_path = 'guide/introduction.html'
2425 self.initial_paths = %w(api/)
lib/docs/scrapers/vue_router.rb+1−1
@@ -21,7 +21,7 @@ module Docs · 20 unmodified lines
2121 HTML
2222
2323 version '4' do
24− self.release = '4.0.3'
24+ self.release = '4.0.12'
2525 self.base_url = 'https://next.router.vuejs.org/'
2626 end
2727
lib/docs/scrapers/vuex.rb+1−1
@@ -19,7 +19,7 @@ module Docs · 18 unmodified lines
1919 HTML
2020
2121 version '4' do
22− self.release = '4.0.0'
22+ self.release = '4.0.2'
2323 self.base_url = 'https://next.vuex.vuejs.org/'
2424 end
2525

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t