Unified · Split
Binary file not shown.
Binary file not shown.
| @@ -1,7 +1,7 @@ | |||
| 1 | [ | 1 | [ |
| 2 | [ | 2 | [ |
| 3 | "2015-07-05", | 3 | "2015-07-05", |
| 4 | "New documentations: <a href=\"/drupal/\">Drupal</a>, <a href=\"/phaser/\">Phaser</a> and <a href=\"/webpack/\">webpack</a>" | 4 | "New documentations: <a href=\"/drupal/\">Drupal</a>, <a href=\"/vue/\">Vue.js</a>, <a href=\"/phaser/\">Phaser</a> and <a href=\"/webpack/\">webpack</a>" |
| 5 | ], [ | 5 | ], [ |
| 6 | "2015-05-24", | 6 | "2015-05-24", |
| 7 | "New <a href=\"/rust/\">Rust</a> documentation" | 7 | "New <a href=\"/rust/\">Rust</a> documentation" |
| @@ -360,6 +360,11 @@ credits = [ · 359 unmodified lines | |||
| 360 | '2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors', | 360 | '2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors', |
| 361 | 'MIT', | 361 | 'MIT', |
| 362 | 'https://raw.github.com/jashkenas/underscore/master/LICENSE' | 362 | 'https://raw.github.com/jashkenas/underscore/master/LICENSE' |
| 363 | ], [ | ||
| 364 | 'Vue.js', | ||
| 365 | '2013-2015 Evan You, Vue.js contributors', | ||
| 366 | 'MIT', | ||
| 367 | 'https://raw.githubusercontent.com/yyx990803/vue/master/LICENSE' | ||
| 363 | ], [ | 368 | ], [ |
| 364 | 'Webpack', | 369 | 'Webpack', |
| 365 | '2012-2015 Tobias Koppers', | 370 | '2012-2015 Tobias Koppers', |
| @@ -34,4 +34,5 @@ app.views.JavascriptPage · 33 unmodified lines | |||
| 34 | 34 | ||
| 35 | app.views.RequirejsPage = | 35 | app.views.RequirejsPage = |
| 36 | app.views.SocketioPage = | 36 | app.views.SocketioPage = |
| 37 | app.views.VuePage = | ||
| 37 | app.views.JavascriptWithMarkupCheckPage | 38 | app.views.JavascriptWithMarkupCheckPage |
| @@ -1,14 +0,0 @@ | |||
| 1 | #= require views/pages/base | ||
| 2 | |||
| 3 | class app.views.VuePage extends app.views.BasePage | ||
| 4 | afterRender: -> | ||
| 5 | for el in @findAllByTag('pre') | ||
| 6 | lang = if el.classList.contains('html') or el.textContent[0] is '<' | ||
| 7 | 'markup' | ||
| 8 | else if el.classList.contains('css') | ||
| 9 | 'css' | ||
| 10 | else | ||
| 11 | 'javascript' | ||
| 12 | el.setAttribute('class', '') | ||
| 13 | @highlightCode el, lang | ||
| 14 | return | ||
| @@ -68,5 +68,6 @@ · 67 unmodified lines | |||
| 68 | 'pages/socketio', | 68 | 'pages/socketio', |
| 69 | 'pages/sphinx', | 69 | 'pages/sphinx', |
| 70 | 'pages/underscore', | 70 | 'pages/underscore', |
| 71 | 'pages/vue', | ||
| 71 | 'pages/yard', | 72 | 'pages/yard', |
| 72 | 'pages/yii'; | 73 | 'pages/yii'; |
| @@ -68,5 +68,6 @@ · 67 unmodified lines | |||
| 68 | 'pages/socketio', | 68 | 'pages/socketio', |
| 69 | 'pages/sphinx', | 69 | 'pages/sphinx', |
| 70 | 'pages/underscore', | 70 | 'pages/underscore', |
| 71 | 'pages/vue', | ||
| 71 | 'pages/yard', | 72 | 'pages/yard', |
| 72 | 'pages/yii'; | 73 | 'pages/yii'; |
| @@ -104,3 +104,4 @@ · 103 unmodified lines | |||
| 104 | ._icon-drupal:before { background-position: 0 -8rem; } | 104 | ._icon-drupal:before { background-position: 0 -8rem; } |
| 105 | ._icon-webpack:before { background-position: -1rem -8rem; @extend %darkIconFix !optional; } | 105 | ._icon-webpack:before { background-position: -1rem -8rem; @extend %darkIconFix !optional; } |
| 106 | ._icon-phaser:before { background-position: -2rem -8rem; } | 106 | ._icon-phaser:before { background-position: -2rem -8rem; } |
| 107 | ._icon-vue:before { background-position: -3rem -8rem; } | ||
| @@ -25,7 +25,6 @@ · 24 unmodified lines | |||
| 25 | ._mocha, | 25 | ._mocha, |
| 26 | ._mongoose, | 26 | ._mongoose, |
| 27 | ._sinon, | 27 | ._sinon, |
| 28 | ._vue, | ||
| 29 | ._webpack { | 28 | ._webpack { |
| 30 | @extend %simple; | 29 | @extend %simple; |
| 31 | } | 30 | } |
| @@ -0,0 +1,5 @@ | |||
| 1 | ._vue { | ||
| 2 | @extend %simple; | ||
| 3 | |||
| 4 | p.tip { @extend %note; } | ||
| 5 | } | ||
| @@ -2,12 +2,19 @@ module Docs · 1 unmodified line | |||
| 2 | class Vue | 2 | class Vue |
| 3 | class CleanHtmlFilter < Filter | 3 | class CleanHtmlFilter < Filter |
| 4 | def call | 4 | def call |
| 5 | @doc = at_css('.content') | ||
| 6 | |||
| 7 | at_css('h1').content = 'Vue.js' if root_page? | ||
| 8 | |||
| 9 | css('#demo').remove | ||
| 10 | |||
| 5 | # Remove code highlighting | 11 | # Remove code highlighting |
| 6 | css('figure').each do |node| | 12 | css('figure').each do |node| |
| 7 | node.name = 'pre' | 13 | node.name = 'pre' |
| 8 | node.content = node.at_css('td.code pre').css('.line').map(&:content).join("\n") | 14 | node.content = node.at_css('td.code pre').css('.line').map(&:content).join("\n") |
| 9 | end | 15 | end |
| 10 | css('.content') | 16 | |
| 17 | doc | ||
| 11 | end | 18 | end |
| 12 | end | 19 | end |
| 13 | end | 20 | end |
| @@ -1,16 +1,25 @@ | |||
| 1 | module Docs | 1 | module Docs |
| 2 | class Vue | 2 | class Vue |
| 3 | class EntriesFilter < Docs::EntriesFilter | 3 | class EntriesFilter < Docs::EntriesFilter |
| 4 | def get_name | ||
| 5 | at_css('h1').content | ||
| 6 | end | ||
| 7 | |||
| 8 | def get_type | ||
| 9 | if slug.start_with?('guide') | ||
| 10 | 'Guide' | ||
| 11 | else | ||
| 12 | 'API' | ||
| 13 | end | ||
| 14 | end | ||
| 15 | |||
| 4 | def additional_entries | 16 | def additional_entries |
| 5 | type = nil | 17 | return [] if slug.start_with?('guide') |
| 6 | 18 | ||
| 7 | doc.children.each_with_object [] do |node, entries| | 19 | css('h3').map do |node| |
| 8 | if node.name == 'h1' | 20 | name = node.content.strip |
| 9 | type = node.content.strip | 21 | name.sub! %r{\(.*\)}, '()' |
| 10 | elsif node.name == 'h3' | 22 | [name, node['id'], "API: #{self.name}"] |
| 11 | name = node.content.strip | ||
| 12 | entries << [name, node['id'], type] | ||
| 13 | end | ||
| 14 | end | 23 | end |
| 15 | end | 24 | end |
| 16 | end | 25 | end |
| @@ -3,16 +3,21 @@ module Docs · 2 unmodified lines | |||
| 3 | self.name = 'Vue.js' | 3 | self.name = 'Vue.js' |
| 4 | self.slug = 'vue' | 4 | self.slug = 'vue' |
| 5 | self.type = 'vue' | 5 | self.type = 'vue' |
| 6 | self.version = '0.12.5' | 6 | self.version = '0.12.6' |
| 7 | self.base_url = 'http://vuejs.org/api/' | 7 | self.base_url = 'http://vuejs.org' |
| 8 | 8 | self.root_path = '/guide/index.html' | |
| 9 | self.initial_paths = %w(/api/index.html) | ||
| 10 | self.links = { | ||
| 11 | home: 'http://vuejs.org/', | ||
| 12 | code: 'https://github.com/yyx990803/vue' | ||
| 13 | } | ||
| 9 | 14 | ||
| 10 | html_filters.push 'vue/clean_html', 'vue/entries' | 15 | html_filters.push 'vue/clean_html', 'vue/entries' |
| 11 | options[:follow_links] = ->(filter) { filter.root_page? } | ||
| 12 | 16 | ||
| 17 | options[:only_patterns] = [/\/guide\//, /\/api\//] | ||
| 13 | 18 | ||
| 14 | options[:attribution] = <<-HTML | 19 | options[:attribution] = <<-HTML |
| 15 | © 2014–2015 Evan You, Vue.js contributors<br> | 20 | © 2013–2015 Evan You, Vue.js contributors<br> |
| 16 | Licensed under the MIT License. | 21 | Licensed under the MIT License. |
| 17 | HTML | 22 | HTML |
| 18 | end | 23 | end |
Binary file not shown.
Binary file not shown.