bump vue to 2.6.10
Unified · Split
| @@ -758,9 +758,9 @@ credits = [ · 757 unmodified lines | ||
| 758 | 758 | 'https://raw.githubusercontent.com/vuejs/vue-router/dev/LICENSE' |
| 759 | 759 | ], [ |
| 760 | 760 | 'Vue.js', |
| 761 | − '2013-2018 Evan You, Vue.js contributors', | |
| 761 | + '2013-present Yuxi Evan You', | |
| 762 | 762 | 'MIT', |
| 763 | − 'https://raw.githubusercontent.com/vuejs/vue/master/LICENSE' | |
| 763 | + 'https://raw.githubusercontent.com/vuejs/vuejs.org/master/LICENSE' | |
| 764 | 764 | ], [ |
| 765 | 765 | 'Vuex', |
| 766 | 766 | '2015-present Evan You', |
| @@ -16,10 +16,19 @@ module Docs · 15 unmodified lines | ||
| 16 | 16 | node['data-language'] = node['class'][/highlight (\w+)/, 1] |
| 17 | 17 | end |
| 18 | 18 | |
| 19 | + css('pre').each do |node| | |
| 20 | + node.content = node.content.strip | |
| 21 | + node['data-language'] = 'javascript' | |
| 22 | + end | |
| 23 | + | |
| 19 | 24 | css('iframe').each do |node| |
| 20 | 25 | node['sandbox'] = 'allow-forms allow-scripts allow-same-origin' |
| 21 | 26 | end |
| 22 | 27 | |
| 28 | + css('details').each do |node| | |
| 29 | + node.name = 'div' | |
| 30 | + end | |
| 31 | + | |
| 23 | 32 | doc |
| 24 | 33 | end |
| 25 | 34 | end |
| @@ -2,11 +2,16 @@ module Docs · 1 unmodified line | ||
| 2 | 2 | class Vue |
| 3 | 3 | class EntriesFilter < Docs::EntriesFilter |
| 4 | 4 | def get_name |
| 5 | − if slug == 'api/' | |
| 5 | + if slug == 'api/' || slug == 'api/index' | |
| 6 | 6 | 'API' |
| 7 | + elsif slug == 'style-guide/' | |
| 8 | + 'Style Guide' | |
| 7 | 9 | else |
| 8 | 10 | name = at_css('.content h1').content |
| 9 | 11 | node = at_css(".sidebar .menu-root a[href='#{File.basename(slug)}']") |
| 12 | + | |
| 13 | + return name if node.nil? | |
| 14 | + | |
| 10 | 15 | index = node.parent.parent.css('> li > a').to_a.index(node) |
| 11 | 16 | name.prepend "#{index + 1}. " if index |
| 12 | 17 | name |
| @@ -16,6 +21,8 @@ module Docs · 3 unmodified lines | ||
| 16 | 21 | def get_type |
| 17 | 22 | if slug.start_with?('guide') |
| 18 | 23 | 'Guide' |
| 24 | + elsif slug == 'style-guide/' | |
| 25 | + 'Style Guide' | |
| 19 | 26 | else |
| 20 | 27 | 'API' |
| 21 | 28 | end |
| @@ -31,7 +38,15 @@ module Docs · 9 unmodified lines | ||
| 31 | 38 | else |
| 32 | 39 | name = node.content.strip |
| 33 | 40 | name.sub! %r{\(.*\)}, '()' |
| 34 | − entries << [name, node['id'], "API: #{type}"] | |
| 41 | + name.sub! /(essential|strongly recommended|recommended|use with caution)\Z/, '' | |
| 42 | + | |
| 43 | + current_type = "API: #{type}" | |
| 44 | + if slug == 'style-guide/' | |
| 45 | + current_type = "Style Guide: " | |
| 46 | + current_type += type.sub(/( Rules: )/, ': ').split('(')[0] | |
| 47 | + end | |
| 48 | + | |
| 49 | + entries << [name, node['id'], current_type] | |
| 35 | 50 | end |
| 36 | 51 | end |
| 37 | 52 | end |
| @@ -15,12 +15,12 @@ module Docs · 14 unmodified lines | ||
| 15 | 15 | options[:replace_paths] = { 'guide/' => 'guide/index.html' } |
| 16 | 16 | |
| 17 | 17 | options[:attribution] = <<-HTML |
| 18 | − © 2013–2018 Evan You, Vue.js contributors<br> | |
| 18 | + © 2013–present Yuxi Evan You<br> | |
| 19 | 19 | Licensed under the MIT License. |
| 20 | 20 | HTML |
| 21 | 21 | |
| 22 | 22 | version '2' do |
| 23 | − self.release = '2.5.16' | |
| 23 | + self.release = '2.6.10' | |
| 24 | 24 | self.base_url = 'https://vuejs.org/v2/' |
| 25 | 25 | self.root_path = 'guide/index.html' |
| 26 | 26 | self.initial_paths = %w(api/) |