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
14 node.name = 'strong'14 node.name = 'strong'
15 end15 end
16 16
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
17 # Remove code highlighting26 # Remove code highlighting
18 css('figure').each do |node|27 css('figure').each do |node|
19 node.name = 'pre'28 node.name = 'pre'
lib/docs/filters/vue_router/entries.rb+3−3
@@ -3,7 +3,7 @@ module Docs · 2 unmodified lines
3 class EntriesFilter < Docs::EntriesFilter3 class EntriesFilter < Docs::EntriesFilter
4 def get_name4 def get_name
5 name = at_css('h1').content5 name = at_css('h1').content
6 name.remove! '# '6 name.sub! %r{#\s*}, ''
7 name7 name
8 end8 end
9 9
@@ -34,9 +34,9 @@ module Docs · 24 unmodified lines
34 title = node34 title = node
35 title = title.previous_element until title.name == 'h2'35 title = title.previous_element until title.name == 'h2'
36 title = title.content.strip36 title = title.content.strip
37 title.remove! '# '37 title.sub! %r{#\s*}, ''
38 38
39 entry_name.remove! '# '39 entry_name.sub! %r{#\s*}, ''
40 40
41 case title41 case title
42 when 'Router Construction Options'42 when 'Router Construction Options'
lib/docs/filters/vuex/entries.rb+3−3
@@ -4,7 +4,7 @@ module Docs · 3 unmodified lines
4 def get_name4 def get_name
5 name = at_css('h1').content5 name = at_css('h1').content
6 6
7 name.remove! '# '7 name.sub! %r{#\s*}, ''
8 8
9 # Add index on guides9 # Add index on guides
10 unless subpath.start_with?('api')10 unless subpath.start_with?('api')
@@ -42,9 +42,9 @@ module Docs · 31 unmodified lines
42 title = node42 title = node
43 title = title.previous_element until title.name == 'h2'43 title = title.previous_element until title.name == 'h2'
44 title = title.content.strip44 title = title.content.strip
45 title.remove! '# '45 title.sub! %r{#\s*}, ''
46 46
47 entry_name.remove! '# '47 entry_name.sub! %r{#\s*}, ''
48 48
49 unless entry_name.start_with?('router.')49 unless entry_name.start_with?('router.')
50 case title50 case title
lib/docs/scrapers/vue.rb+2−1
@@ -10,6 +10,7 @@ module Docs · 9 unmodified lines
10 10
11 options[:only_patterns] = [/guide\//, /api\//]11 options[:only_patterns] = [/guide\//, /api\//]
12 options[:skip] = %w(guide/team.html)12 options[:skip] = %w(guide/team.html)
13 options[:skip_patterns] = [/guide\/contributing/]
13 options[:replace_paths] = { 'guide/' => 'guide/index.html' }14 options[:replace_paths] = { 'guide/' => 'guide/index.html' }
14 15
15 options[:attribution] = <<-HTML16 options[:attribution] = <<-HTML
@@ -18,7 +19,7 @@ module Docs · 2 unmodified lines
18 HTML19 HTML
19 20
20 version '3' do21 version '3' do
21 self.release = '3.2.4'22 self.release = '3.2.20'
22 self.base_url = 'https://v3.vuejs.org/'23 self.base_url = 'https://v3.vuejs.org/'
23 self.root_path = 'guide/introduction.html'24 self.root_path = 'guide/introduction.html'
24 self.initial_paths = %w(api/)25 self.initial_paths = %w(api/)
lib/docs/scrapers/vue_router.rb+1−1
@@ -21,7 +21,7 @@ module Docs · 20 unmodified lines
21 HTML21 HTML
22 22
23 version '4' do23 version '4' do
24 self.release = '4.0.3'24 self.release = '4.0.12'
25 self.base_url = 'https://next.router.vuejs.org/'25 self.base_url = 'https://next.router.vuejs.org/'
26 end26 end
27 27
lib/docs/scrapers/vuex.rb+1−1
@@ -19,7 +19,7 @@ module Docs · 18 unmodified lines
19 HTML19 HTML
20 20
21 version '4' do21 version '4' do
22 self.release = '4.0.0'22 self.release = '4.0.2'
23 self.base_url = 'https://next.vuex.vuejs.org/'23 self.base_url = 'https://next.vuex.vuejs.org/'
24 end24 end
25 25

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