History

Update Vue Router documentation (3.5.1 and 4.0.3)

Simon Legner committed 5 years ago

Commit b724e811 parent bf248f02 files · +19 −4Browse files

Unified · Split

2 files
  1. lib/docs/filters/vue_router/clean_html.rb +8 −1
  2. lib/docs/scrapers/vue_router.rb +11 −3
lib/docs/filters/vue_router/clean_html.rb+8−1
@@ -2,7 +2,7 @@ module Docs · 1 unmodified line
22 class VueRouter
33 class CleanHtmlFilter < Filter
44 def call
5− @doc = at_css('.content')
5+ @doc = at_css('main')
66
77 # Remove unneeded elements
88 css('.bit-sponsor, .header-anchor').remove
@@ -14,6 +14,13 @@ module Docs · 5 unmodified lines
1414 title.name = 'strong' unless title.nil?
1515 end
1616
17+ # Remove data-v-* attributes
18+ css('*').each do |node|
19+ node.attributes.each_key do |attribute|
20+ node.remove_attribute(attribute) if attribute.start_with? 'data-v-'
21+ end
22+ end
23+
1724 doc
1825 end
1926 end
lib/docs/scrapers/vue_router.rb+11−3
@@ -3,8 +3,6 @@ module Docs · 2 unmodified lines
33 self.name = 'Vue Router'
44 self.slug = 'vue_router'
55 self.type = 'simple'
6− self.release = '3.1.2'
7− self.base_url = 'https://router.vuejs.org/'
86 self.links = {
97 home: 'https://router.vuejs.org',
108 code: 'https://github.com/vuejs/vue-router'
@@ -22,8 +20,18 @@ module Docs · 11 unmodified lines
2220 Licensed under the MIT License.
2321 HTML
2422
23+ version '4' do
24+ self.release = '4.0.3'
25+ self.base_url = 'https://next.router.vuejs.org/'
26+ end
27+
28+ version '3' do
29+ self.release = '3.5.1'
30+ self.base_url = 'https://router.vuejs.org/'
31+ end
32+
2533 def get_latest_version(opts)
26− get_latest_github_release('vuejs', 'vue-router', opts)
34+ get_npm_version('vue-router', opts, 'next')
2735 end
2836 end
2937 end

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