Unified · Split
Binary file not shown.
Binary file not shown.
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | [ |
| 2 | 2 | [ "2014-12-21", |
| 3 | − "New <a href=\"/react/\">React</a>, <a href=\"/rethinkdb/\">RethinkDB</a>, <a href=\"/socketio/\">Socket.IO</a> and <a href=\"/modernizr/\">Modernizr</a> documentations" | |
| 3 | + "New <a href=\"/react/\">React</a>, <a href=\"/rethinkdb/\">RethinkDB</a>, <a href=\"/socketio/\">Socket.IO</a>, <a href=\"/modernizr/\">Modernizr</a> and <a href=\"/bower/\">Bower</a> documentations" | |
| 4 | 4 | ], [ |
| 5 | 5 | "2014-11-30", |
| 6 | 6 | "New <a href=\"/phpunit/\">PHPUnit</a> and <a href=\"/nokogiri/\">Nokogiri</a> documentations" |
| @@ -88,6 +88,11 @@ credits = [ · 87 unmodified lines | ||
| 88 | 88 | '2010-2014 Jeremy Ashkenas, DocumentCloud', |
| 89 | 89 | 'MIT', |
| 90 | 90 | 'https://raw.github.com/jashkenas/backbone/master/LICENSE' |
| 91 | + ], [ | |
| 92 | + 'Bower', | |
| 93 | + '2014 Bower contributors', | |
| 94 | + 'CC BY', | |
| 95 | + 'https://github.com/bower/bower.github.io/blob/b7b94ad38b72e8fb5dafb20c8ce42835a49cc98f/package.json#L20' | |
| 91 | 96 | ], [ |
| 92 | 97 | 'C<br>C++', |
| 93 | 98 | 'cppreference.com', |
| @@ -0,0 +1,6 @@ | ||
| 1 | +#= require views/pages/base | |
| 2 | + | |
| 3 | +class app.views.BowerPage extends app.views.BasePage | |
| 4 | + afterRender: -> | |
| 5 | + @highlightCode @findAll('pre[data-lang="js"], pre[data-lang="json"]'), 'javascript' | |
| 6 | + return | |
| @@ -29,6 +29,7 @@ · 28 unmodified lines | ||
| 29 | 29 | 'components/mobile'; |
| 30 | 30 | |
| 31 | 31 | @import 'pages/angular', |
| 32 | + 'pages/bower', | |
| 32 | 33 | 'pages/c', |
| 33 | 34 | 'pages/chai', |
| 34 | 35 | 'pages/coffeescript', |
| @@ -76,3 +76,4 @@ · 75 unmodified lines | ||
| 76 | 76 | ._icon-react:before { background-position: -1rem -12rem; } |
| 77 | 77 | ._icon-socketio:before { background-position: -2rem -12rem; } |
| 78 | 78 | ._icon-modernizr:before { background-position: -3rem -12rem; } |
| 79 | +._icon-bower:before { background-position: -4rem -12rem; } | |
| @@ -0,0 +1,7 @@ | ||
| 1 | +._bower { | |
| 2 | + h2 { @extend %block-heading; } | |
| 3 | + h3 { @extend %block-label, %label-blue; } | |
| 4 | + h4 { @extend %block-label; } | |
| 5 | + | |
| 6 | + code { @extend %label; } | |
| 7 | +} | |
| @@ -0,0 +1,21 @@ | ||
| 1 | +module Docs | |
| 2 | + class Bower | |
| 3 | + class CleanHtmlFilter < Filter | |
| 4 | + def call | |
| 5 | + title = at_css('.page-title') | |
| 6 | + @doc = at_css('.main') | |
| 7 | + doc.child.before(title) | |
| 8 | + | |
| 9 | + css('.site-footer').remove | |
| 10 | + | |
| 11 | + css('.highlight').each do |node| | |
| 12 | + node.name = 'pre' | |
| 13 | + node['data-lang'] = node.at_css('[data-lang]')['data-lang'] | |
| 14 | + node.content = node.content | |
| 15 | + end | |
| 16 | + | |
| 17 | + doc | |
| 18 | + end | |
| 19 | + end | |
| 20 | + end | |
| 21 | +end | |
| @@ -0,0 +1,26 @@ | ||
| 1 | +module Docs | |
| 2 | + class Bower | |
| 3 | + class EntriesFilter < Docs::EntriesFilter | |
| 4 | + ENTRIES_TYPE_BY_SLUG = { | |
| 5 | + 'api' => 'Commands', | |
| 6 | + 'config' => '.bowerrc' | |
| 7 | + } | |
| 8 | + | |
| 9 | + def get_name | |
| 10 | + at_css('h1').content | |
| 11 | + end | |
| 12 | + | |
| 13 | + def get_type | |
| 14 | + 'Guides' | |
| 15 | + end | |
| 16 | + | |
| 17 | + def additional_entries | |
| 18 | + return [] unless type = ENTRIES_TYPE_BY_SLUG[slug] | |
| 19 | + | |
| 20 | + css('#bowerrc-specification + ul a', '#commands + p + ul a').map do |node| | |
| 21 | + [node.content, node['href'].remove('#'), type] | |
| 22 | + end | |
| 23 | + end | |
| 24 | + end | |
| 25 | + end | |
| 26 | +end | |
| @@ -0,0 +1,19 @@ | ||
| 1 | +module Docs | |
| 2 | + class Bower < UrlScraper | |
| 3 | + self.name = 'Bower' | |
| 4 | + self.type = 'bower' | |
| 5 | + self.version = '1.3.12' | |
| 6 | + self.base_url = 'http://bower.io/docs/' | |
| 7 | + self.root_path = 'api' | |
| 8 | + | |
| 9 | + html_filters.push 'bower/clean_html', 'bower/entries' | |
| 10 | + | |
| 11 | + options[:trailing_slash] = false | |
| 12 | + options[:skip] = %w(tools about) | |
| 13 | + | |
| 14 | + options[:attribution] = <<-HTML | |
| 15 | + © 2014 Bower contributors<br> | |
| 16 | + Licensed under the Creative Commons Attribution License. | |
| 17 | + HTML | |
| 18 | + end | |
| 19 | +end | |
Binary file not shown.
Binary file not shown.
| @@ -0,0 +1 @@ | ||
| 1 | +http://bower.io/docs/about/#logo | |