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 documentation: <a href=\"/drupal/\">Drupal</a>" | 4 | "New documentations: <a href=\"/drupal/\">Drupal</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" |
| @@ -355,6 +355,11 @@ credits = [ · 354 unmodified lines | |||
| 355 | '2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors', | 355 | '2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors', |
| 356 | 'MIT', | 356 | 'MIT', |
| 357 | 'https://raw.github.com/jashkenas/underscore/master/LICENSE' | 357 | 'https://raw.github.com/jashkenas/underscore/master/LICENSE' |
| 358 | ], [ | ||
| 359 | 'Webpack', | ||
| 360 | '2012-2015 Tobias Koppers', | ||
| 361 | 'MIT', | ||
| 362 | 'https://raw.githubusercontent.com/webpack/webpack/master/LICENSE' | ||
| 358 | ], [ | 363 | ], [ |
| 359 | 'Yii', | 364 | 'Yii', |
| 360 | '2008-2015 by Yii Software LLC', | 365 | '2008-2015 by Yii Software LLC', |
| @@ -28,6 +28,7 @@ app.views.NodePage = · 27 unmodified lines | |||
| 28 | app.views.RethinkdbPage = | 28 | app.views.RethinkdbPage = |
| 29 | app.views.SinonPage = | 29 | app.views.SinonPage = |
| 30 | app.views.UnderscorePage = | 30 | app.views.UnderscorePage = |
| 31 | app.views.WebpackPage = | ||
| 31 | app.views.JavascriptPage | 32 | app.views.JavascriptPage |
| 32 | 33 | ||
| 33 | app.views.RequirejsPage = | 34 | app.views.RequirejsPage = |
| @@ -67,6 +67,5 @@ · 66 unmodified lines | |||
| 67 | 'pages/socketio', | 67 | 'pages/socketio', |
| 68 | 'pages/sphinx', | 68 | 'pages/sphinx', |
| 69 | 'pages/underscore', | 69 | 'pages/underscore', |
| 70 | 'pages/webpack', | ||
| 71 | 'pages/yard', | 70 | 'pages/yard', |
| 72 | 'pages/yii'; | 71 | 'pages/yii'; |
| @@ -68,5 +68,4 @@ · 67 unmodified lines | |||
| 68 | 'pages/sphinx', | 68 | 'pages/sphinx', |
| 69 | 'pages/underscore', | 69 | 'pages/underscore', |
| 70 | 'pages/yard', | 70 | 'pages/yard', |
| 71 | 'pages/webpack', | ||
| 72 | 'pages/yii'; | 71 | 'pages/yii'; |
| @@ -102,3 +102,4 @@ · 101 unmodified lines | |||
| 102 | ._icon-npm:before { background-position: -8rem -7rem; } | 102 | ._icon-npm:before { background-position: -8rem -7rem; } |
| 103 | ._icon-apache_http_server:before { background-position: -9rem -7rem; } | 103 | ._icon-apache_http_server:before { background-position: -9rem -7rem; } |
| 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; } | ||
| @@ -24,7 +24,8 @@ · 23 unmodified lines | |||
| 24 | ._markdown, | 24 | ._markdown, |
| 25 | ._mocha, | 25 | ._mocha, |
| 26 | ._mongoose, | 26 | ._mongoose, |
| 27 | ._sinon { | 27 | ._sinon, |
| 28 | ._webpack { | ||
| 28 | @extend %simple; | 29 | @extend %simple; |
| 29 | } | 30 | } |
| 30 | 31 | ||
| @@ -1,55 +0,0 @@ | |||
| 1 | ._webpack { | ||
| 2 | > h2 { @extend %block-heading; } | ||
| 3 | > h3 { @extend %block-label, %label-blue; } | ||
| 4 | > h4 { font-size: 1em; } | ||
| 5 | |||
| 6 | /* | ||
| 7 | Copied from the original webpack css | ||
| 8 | https://webpack.github.io/docs/css/doc.css | ||
| 9 | */ | ||
| 10 | code .comment { | ||
| 11 | color: #998; | ||
| 12 | font-style: italic | ||
| 13 | } | ||
| 14 | |||
| 15 | code .keyword { | ||
| 16 | color: #333; | ||
| 17 | font-weight: 700 | ||
| 18 | } | ||
| 19 | |||
| 20 | code .number { | ||
| 21 | color: #099 | ||
| 22 | } | ||
| 23 | |||
| 24 | code .string { | ||
| 25 | color: #d14 | ||
| 26 | } | ||
| 27 | |||
| 28 | code .tag { | ||
| 29 | color: navy; | ||
| 30 | font-weight: 400 | ||
| 31 | } | ||
| 32 | |||
| 33 | code .attribute { | ||
| 34 | color: teal | ||
| 35 | } | ||
| 36 | |||
| 37 | code .regexp { | ||
| 38 | color: #009926 | ||
| 39 | } | ||
| 40 | |||
| 41 | code .preprocessor { | ||
| 42 | color: #999; | ||
| 43 | font-weight: 700 | ||
| 44 | } | ||
| 45 | |||
| 46 | code .deletion { | ||
| 47 | background: #fdd; | ||
| 48 | display: block | ||
| 49 | } | ||
| 50 | |||
| 51 | code .addition { | ||
| 52 | background: #dfd; | ||
| 53 | display: block | ||
| 54 | } | ||
| 55 | } | ||
| @@ -1,5 +1,5 @@ | |||
| 1 | module Docs | 1 | module Docs |
| 2 | class Webpack | 2 | class Webpack |
| 3 | class CleanHtmlFilter < Filter | 3 | class CleanHtmlFilter < Filter |
| 4 | def call | 4 | def call |
| 5 | root_page? ? root : other | 5 | root_page? ? root : other |
| @@ -14,32 +14,20 @@ module Docs · 8 unmodified lines | |||
| 14 | # in devdocs. | 14 | # in devdocs. |
| 15 | hr_index = doc.children.find_index { |node| node.name == "hr" } | 15 | hr_index = doc.children.find_index { |node| node.name == "hr" } |
| 16 | doc.children[0..hr_index].each(&:remove) | 16 | doc.children[0..hr_index].each(&:remove) |
| 17 | |||
| 18 | # Add a page header :) | ||
| 19 | page_header_node = Nokogiri::XML::Node.new "h1", @doc | ||
| 20 | page_header_node.content = "Webpack" | ||
| 21 | @doc.children.first.add_previous_sibling page_header_node | ||
| 22 | end | 17 | end |
| 23 | 18 | ||
| 24 | 19 | ||
| 25 | def other | 20 | def other |
| 26 | # Re-create the header element | 21 | # Re-create the header element |
| 27 | page_header = at_css("#wikititle").content.upcase | 22 | at_css("#wiki").child.before("<h1>#{at_css("#wikititle").content}</h1>") |
| 28 | page_header_node = Nokogiri::XML::Node.new "h1", @doc | ||
| 29 | page_header_node.content = page_header | ||
| 30 | 23 | ||
| 31 | # Change the scope of the page | ||
| 32 | @doc = at_css("#wiki") | 24 | @doc = at_css("#wiki") |
| 33 | 25 | ||
| 34 | # Add the page header | 26 | css('.contents', 'a.anchor', 'hr').remove |
| 35 | @doc.children.first.add_previous_sibling page_header_node | ||
| 36 | |||
| 37 | # Remove the sidebar links in each page | ||
| 38 | css(".contents").remove | ||
| 39 | |||
| 40 | # Remove all anchors | ||
| 41 | css("a.anchor").remove | ||
| 42 | 27 | ||
| 28 | css('pre').each do |node| | ||
| 29 | node.content = node.content | ||
| 30 | end | ||
| 43 | end | 31 | end |
| 44 | end | 32 | end |
| 45 | end | 33 | end |
| @@ -2,7 +2,7 @@ module Docs · 1 unmodified line | |||
| 2 | class Webpack | 2 | class Webpack |
| 3 | class EntriesFilter < Docs::EntriesFilter | 3 | class EntriesFilter < Docs::EntriesFilter |
| 4 | def get_name | 4 | def get_name |
| 5 | entry_link.content.strip.titleize | 5 | entry_link.content |
| 6 | end | 6 | end |
| 7 | 7 | ||
| 8 | def get_type | 8 | def get_type |
| @@ -10,7 +10,7 @@ module Docs · 1 unmodified line | |||
| 10 | type_links_list = link_li.parent | 10 | type_links_list = link_li.parent |
| 11 | current_type = type_links_list.parent | 11 | current_type = type_links_list.parent |
| 12 | 12 | ||
| 13 | # current type is a | 13 | # current type is a |
| 14 | # <li> | 14 | # <li> |
| 15 | # TYPE | 15 | # TYPE |
| 16 | # <li> <ul> .. links .. </ul> </li> | 16 | # <li> <ul> .. links .. </ul> </li> |
| @@ -20,16 +20,6 @@ module Docs · 3 unmodified lines | |||
| 20 | current_type.children.first.content.strip.titleize | 20 | current_type.children.first.content.strip.titleize |
| 21 | end | 21 | end |
| 22 | 22 | ||
| 23 | |||
| 24 | def additional_entries | ||
| 25 | return [] unless root_page? | ||
| 26 | |||
| 27 | css('.sidebar a').each_with_object [] do |link, entries| | ||
| 28 | name = link.content.strip | ||
| 29 | entries << [name, link['href']] | ||
| 30 | end | ||
| 31 | end | ||
| 32 | |||
| 33 | private | 23 | private |
| 34 | 24 | ||
| 35 | def entry_link | 25 | def entry_link |
| @@ -1,13 +1,20 @@ | |||
| 1 | module Docs | 1 | module Docs |
| 2 | class Webpack < UrlScraper | 2 | class Webpack < UrlScraper |
| 3 | self.name = 'Webpack' | 3 | self.name = 'webpack' |
| 4 | self.type = 'webpack' | 4 | self.type = 'webpack' |
| 5 | self.version = '1.9' | 5 | self.version = '1.10' |
| 6 | self.base_url = 'https://webpack.github.io/docs/' | 6 | self.base_url = 'https://webpack.github.io/docs/' |
| 7 | self.root_path = 'index.html' | 7 | self.links = { |
| 8 | home: 'https://webpack.github.io/', | ||
| 9 | code: 'https://github.com/webpack/webpack' | ||
| 10 | } | ||
| 8 | 11 | ||
| 9 | html_filters.push 'webpack/entries', 'webpack/clean_html' | 12 | html_filters.push 'webpack/entries', 'webpack/clean_html', 'title' |
| 10 | 13 | ||
| 14 | options[:title] = false | ||
| 15 | options[:root_title] = 'webpack' | ||
| 16 | |||
| 17 | options[:skip] = %w(list-of-tutorials.html examples.html changelog.html ideas.html roadmap.html) | ||
| 11 | 18 | ||
| 12 | options[:attribution] = <<-HTML | 19 | options[:attribution] = <<-HTML |
| 13 | © 2012–2015 Tobias Koppers<br> | 20 | © 2012–2015 Tobias Koppers<br> |
Binary file not shown.
Binary file not shown.