devdocs/lib/docs/scrapers/vue_router.rb

38 lines
853 B
Ruby
Raw Permalink Normal View History

2018-10-03 21:50:22 +02:00
module Docs
class VueRouter < UrlScraper
self.name = 'Vue Router'
2019-08-13 18:14:58 +02:00
self.slug = 'vue_router'
2018-10-03 21:50:22 +02:00
self.type = 'simple'
self.links = {
home: 'https://router.vuejs.org',
code: 'https://github.com/vuejs/vue-router'
}
html_filters.push 'vue_router/entries', 'vue_router/clean_html'
options[:skip_patterns] = [
# Other languages
/^(zh|ja|ru|kr|fr)\//,
2018-10-03 21:50:22 +02:00
]
options[:attribution] = <<-HTML
2019-08-13 18:14:58 +02:00
&copy; 2013&ndash;present Evan You<br>
2018-10-03 21:50:22 +02:00
Licensed under the MIT License.
HTML
2019-08-13 18:14:58 +02:00
version '4' do
self.release = '4.0.12'
self.base_url = 'https://next.router.vuejs.org/'
end
version '3' do
self.release = '3.5.1'
self.base_url = 'https://router.vuejs.org/'
end
2019-08-13 18:14:58 +02:00
def get_latest_version(opts)
get_npm_version('vue-router', opts, 'next')
2019-08-13 18:14:58 +02:00
end
2018-10-03 21:50:22 +02:00
end
end