Add Async documentation

pull/537/head
Thibaut Courouble 8 years ago
parent a0cfe45f21
commit 6e43cfe7ba

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

After

Width:  |  Height:  |  Size: 135 KiB

@ -1,7 +1,7 @@
[
[
"2016-11-20",
"New documentations: <a href=\"/yarn/\">Yarn</a> and <a href=\"/immutable/\">Immutable.js</a>"
"New documentations: <a href=\"/yarn/\">Yarn</a>, <a href=\"/immutable/\">Immutable.js</a> and <a href=\"/async/\">Async</a>"
], [
"2016-10-10",
"New documentations: <a href=\"/scikit_learn/\">scikit-learn</a> and <a href=\"/statsmodels/\">Statsmodels</a>"

@ -99,6 +99,11 @@ credits = [
'2016 The Apache Software Foundation<br>Apache and the Apache feather logo are trademarks of The Apache Software Foundation.',
'Apache',
'https://www.apache.org/licenses/LICENSE-2.0'
], [
'Async',
'2010-2016 Caolan McMahon',
'MIT',
'https://raw.githubusercontent.com/caolan/async/master/LICENSE'
], [
'Backbone.js',
'2010-2016 Jeremy Ashkenas, DocumentCloud',

@ -8,6 +8,7 @@ class app.views.SimplePage extends app.views.BasePage
app.views.AngularPage =
app.views.AngularjsPage =
app.views.AsyncPage =
app.views.BootstrapPage =
app.views.BowerPage =
app.views.CPage =

@ -34,6 +34,7 @@
'pages/angular',
'pages/angularjs',
'pages/apache',
'pages/async',
'pages/bootstrap',
'pages/c',
'pages/cakephp',

@ -34,6 +34,7 @@
'pages/angular',
'pages/angularjs',
'pages/apache',
'pages/async',
'pages/bootstrap',
'pages/c',
'pages/cakephp',

@ -56,6 +56,7 @@
%icon-close-white { background-position: -2rem -5rem; }
%icon-back { background-position: -3rem -5rem; @extend %darkIconFix !optional; }
._icon-async:before { background-position: -6rem 0; @extend %darkIconFix !optional; }
._icon-http:before { background-position: -7rem 0; @extend %darkIconFix !optional; }
._icon-jquery:before { background-position: -8rem 0; @extend %darkIconFix !optional; }
._icon-underscore:before { background-position: -9rem 0; @extend %darkIconFix !optional; }

@ -0,0 +1,15 @@
._async {
@extend %simple;
h3 > .type-signature {
float: right;
color: $textColorLight;
}
h3 > .signature-attributes {
font-size: .75rem;
font-weight: normal;
font-style: italic;
color: $textColorLighter;
}
}

@ -0,0 +1,30 @@
module Docs
class Async
class CleanHtmlFilter < Filter
def call
@doc = at_css('#main-container')
at_css('footer').remove
css('section', 'header', 'article', '.container-overview', 'span.signature', 'div.description').each do |node|
node.before(node.children).remove
end
css('h3', 'h4', 'h5').each do |node|
node.name = node.name.sub(/\d/) { |i| i.to_i - 1 }
end
css('dd ul').each do |node|
node.replace(node.css('li').map(&:inner_html).join(' '))
end
css('pre').each do |node|
node['data-language'] = 'javascript'
node.content = node.content
end
doc
end
end
end
end

@ -0,0 +1,22 @@
module Docs
class Async
class EntriesFilter < Docs::EntriesFilter
def additional_entries
type = nil
entries = []
css('.nav.methods li').each do |node|
if node['class'] == 'toc-header'
type = node.content
else
name = node.content
id = node.at_css('a')['href'].remove('#')
entries << [name, id, type]
end
end
entries
end
end
end
end

@ -0,0 +1,21 @@
module Docs
class Async < UrlScraper
self.type = 'async'
self.release = '2.1.2'
self.base_url = 'https://caolan.github.io/async/'
self.root_path = 'docs.html'
self.links = {
home: 'https://caolan.github.io/async/',
code: 'https://github.com/caolan/async'
}
html_filters.push 'async/entries', 'async/clean_html'
options[:skip_links] = true
options[:attribution] = <<-HTML
&copy; 2010&ndash;2016 Caolan McMahon<br>
Licensed under the MIT License.
HTML
end
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 659 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 798 B

@ -0,0 +1 @@
https://raw.githubusercontent.com/caolan/async/master/logo/favicon.ico
Loading…
Cancel
Save