Unified · Split
Binary file not shown.
Binary file not shown.
| @@ -110,6 +110,11 @@ credits = [ · 109 unmodified lines | ||
| 110 | 110 | '2014 Yehuda Katz, Tom Dale and Ember.js contributors', |
| 111 | 111 | 'MIT', |
| 112 | 112 | 'https://raw.github.com/emberjs/ember.js/master/LICENSE' |
| 113 | + ], [ | |
| 114 | + 'Express', | |
| 115 | + '2009-2014 TJ Holowaychuk', | |
| 116 | + 'MIT', | |
| 117 | + 'https://raw.githubusercontent.com/visionmedia/express/master/LICENSE' | |
| 113 | 118 | ], [ |
| 114 | 119 | 'Git', |
| 115 | 120 | '2005-2014 Linus Torvalds and others', |
| @@ -24,7 +24,10 @@ newsItem = (date, news) -> · 23 unmodified lines | ||
| 24 | 24 | result |
| 25 | 25 | |
| 26 | 26 | app.news = [ |
| 27 | − [ 1396742400000, # April 6, 2014 | |
| 27 | + [ 1399075200000, # May 3, 2014 | |
| 28 | + """ New <a href="/express/">Express</a> documentation """, | |
| 29 | + ], [ | |
| 30 | + 1396742400000, # April 6, 2014 | |
| 28 | 31 | """ New <a href="/go/">Go</a> documentation """, |
| 29 | 32 | ], [ |
| 30 | 33 | 1396137600000, # March 30, 2014 |
| @@ -0,0 +1,4 @@ | ||
| 1 | +#= require views/pages/base | |
| 2 | +#= require views/pages/underscore | |
| 3 | + | |
| 4 | +app.views.ExpressPage = app.views.UnderscorePage | |
| @@ -33,6 +33,7 @@ · 32 unmodified lines | ||
| 33 | 33 | 'pages/coffeescript', |
| 34 | 34 | 'pages/d3', |
| 35 | 35 | 'pages/ember', |
| 36 | + 'pages/express', | |
| 36 | 37 | 'pages/go', |
| 37 | 38 | 'pages/jquery', |
| 38 | 39 | 'pages/knockout', |
| @@ -53,3 +53,4 @@ · 52 unmodified lines | ||
| 53 | 53 | ._icon-yii:before { background-position: -4rem -7rem; } |
| 54 | 54 | ._icon-cpp:before { background-position: 0 -8rem; } |
| 55 | 55 | ._icon-go:before { background-position: -1rem -8rem; } |
| 56 | +._icon-express:before { background-position: -2rem -8rem; } | |
| @@ -0,0 +1,8 @@ | ||
| 1 | +._express { | |
| 2 | + padding-left: 1rem; | |
| 3 | + | |
| 4 | + h1, h2, h3 { margin-left: -1rem; } | |
| 5 | + h2 { @extend %block-heading; } | |
| 6 | + h3 { @extend %block-label, %label-blue; } | |
| 7 | + p > code { @extend %label; } | |
| 8 | +} | |
| @@ -0,0 +1,24 @@ | ||
| 1 | +module Docs | |
| 2 | + class Express | |
| 3 | + class CleanHtmlFilter < Filter | |
| 4 | + def call | |
| 5 | + css('section').each do |node| | |
| 6 | + node.before(node.children).remove | |
| 7 | + end | |
| 8 | + | |
| 9 | + # Put id attributes on headings | |
| 10 | + css('h2 + a[name]').each do |node| | |
| 11 | + node.previous_element['id'] = node['name'] | |
| 12 | + node.remove | |
| 13 | + end | |
| 14 | + | |
| 15 | + # Remove code highlighting | |
| 16 | + css('pre').each do |node| | |
| 17 | + node.content = node.content | |
| 18 | + end | |
| 19 | + | |
| 20 | + doc | |
| 21 | + end | |
| 22 | + end | |
| 23 | + end | |
| 24 | +end | |
| @@ -0,0 +1,21 @@ | ||
| 1 | +module Docs | |
| 2 | + class Express | |
| 3 | + class EntriesFilter < Docs::EntriesFilter | |
| 4 | + def additional_entries | |
| 5 | + type = 'Application' | |
| 6 | + | |
| 7 | + doc.children.each_with_object [] do |node, entries| | |
| 8 | + if node.name == 'h2' | |
| 9 | + type = node.content | |
| 10 | + next | |
| 11 | + elsif node.name == 'h3' | |
| 12 | + name = node.content.strip | |
| 13 | + name.sub! %r{\(.+\)}, '()' | |
| 14 | + | |
| 15 | + entries << [name, node['id'], type] | |
| 16 | + end | |
| 17 | + end | |
| 18 | + end | |
| 19 | + end | |
| 20 | + end | |
| 21 | +end | |
| @@ -0,0 +1,19 @@ | ||
| 1 | +module Docs | |
| 2 | + class Express < UrlScraper | |
| 3 | + self.name = 'Express' | |
| 4 | + self.type = 'express' | |
| 5 | + self.version = '4.1.1' | |
| 6 | + self.base_url = 'http://expressjs.com/4x/api.html' | |
| 7 | + | |
| 8 | + html_filters.push 'express/clean_html', 'express/entries', 'title' | |
| 9 | + | |
| 10 | + options[:title] = 'Express' | |
| 11 | + options[:container] = '#right' | |
| 12 | + options[:skip_links] = true | |
| 13 | + | |
| 14 | + options[:attribution] = <<-HTML | |
| 15 | + © 2009–2014 TJ Holowaychuk<br> | |
| 16 | + Licensed under the MIT License. | |
| 17 | + HTML | |
| 18 | + end | |
| 19 | +end | |
Binary file not shown.
Binary file not shown.