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
2 class VueRouter2 class VueRouter
3 class CleanHtmlFilter < Filter3 class CleanHtmlFilter < Filter
4 def call4 def call
5 @doc = at_css('.content')5 @doc = at_css('main')
6 6
7 # Remove unneeded elements7 # Remove unneeded elements
8 css('.bit-sponsor, .header-anchor').remove8 css('.bit-sponsor, .header-anchor').remove
@@ -14,6 +14,13 @@ module Docs · 5 unmodified lines
14 title.name = 'strong' unless title.nil?14 title.name = 'strong' unless title.nil?
15 end15 end
16 16
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
17 doc24 doc
18 end25 end
19 end26 end
lib/docs/scrapers/vue_router.rb+11−3
@@ -3,8 +3,6 @@ module Docs · 2 unmodified lines
3 self.name = 'Vue Router'3 self.name = 'Vue Router'
4 self.slug = 'vue_router'4 self.slug = 'vue_router'
5 self.type = 'simple'5 self.type = 'simple'
6 self.release = '3.1.2'
7 self.base_url = 'https://router.vuejs.org/'
8 self.links = {6 self.links = {
9 home: 'https://router.vuejs.org',7 home: 'https://router.vuejs.org',
10 code: 'https://github.com/vuejs/vue-router'8 code: 'https://github.com/vuejs/vue-router'
@@ -22,8 +20,18 @@ module Docs · 11 unmodified lines
22 Licensed under the MIT License.20 Licensed under the MIT License.
23 HTML21 HTML
24 22
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
25 def get_latest_version(opts)33 def get_latest_version(opts)
26 get_latest_github_release('vuejs', 'vue-router', opts)34 get_npm_version('vue-router', opts, 'next')
27 end35 end
28 end36 end
29end37end

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