Explorar el Código

Update webpack documentation (1.13)

Thibaut Courouble hace 9 años
padre
commit
da5ff77e7c

+ 1 - 1
assets/javascripts/templates/pages/about_tmpl.coffee

@@ -472,7 +472,7 @@ credits = [
     'https://raw.githubusercontent.com/vuejs/vue/master/LICENSE'
   ], [
     'Webpack',
-    '2012-2015 Tobias Koppers',
+    '2012-2016 Tobias Koppers',
     'MIT',
     'https://raw.githubusercontent.com/webpack/webpack/master/LICENSE'
   ], [

+ 0 - 1
assets/javascripts/views/pages/javascript.coffee

@@ -27,7 +27,6 @@ app.views.MongoosePage =
 app.views.NodePage =
 app.views.PhaserPage =
 app.views.SinonPage =
-app.views.WebpackPage =
 app.views.JavascriptPage
 
 app.views.DojoPage =

+ 1 - 0
assets/javascripts/views/pages/simple.coffee

@@ -17,4 +17,5 @@ app.views.RethinkdbPage =
 app.views.TensorflowPage =
 app.views.TypescriptPage =
 app.views.UnderscorePage =
+app.views.WebpackPage =
 app.views.SimplePage

+ 6 - 1
lib/docs/filters/webpack/clean_html.rb

@@ -18,8 +18,12 @@ module Docs
 
 
       def other
+        css('h1, h2, h3, h4').each do |node|
+          node.name = node.name.sub(/\d/) { |i| i.to_i + 1 }
+        end
+
         # Re-create the header element
-        at_css("#wiki").child.before("<h1>#{at_css("#wikititle").content}</h1>")
+        at_css("#wiki").child.before("<h1>#{at_css("#wikititle").content.titleize}</h1>")
 
         @doc = at_css("#wiki")
 
@@ -27,6 +31,7 @@ module Docs
 
         css('pre').each do |node|
           node.content = node.content
+          node['data-language'] = 'javascript'
         end
       end
     end

+ 2 - 2
lib/docs/scrapers/webpack.rb

@@ -2,7 +2,7 @@ module Docs
   class Webpack < UrlScraper
     self.name = 'webpack'
     self.type = 'webpack'
-    self.release = '1.12'
+    self.release = '1.13'
     self.base_url = 'https://webpack.github.io/docs/'
     self.links = {
       home: 'https://webpack.github.io/',
@@ -17,7 +17,7 @@ module Docs
     options[:skip] = %w(list-of-tutorials.html examples.html changelog.html ideas.html roadmap.html)
 
     options[:attribution] = <<-HTML
-      &copy; 2012&ndash;2015 Tobias Koppers<br>
+      &copy; 2012&ndash;2016 Tobias Koppers<br>
       Licensed under the MIT License.
     HTML
   end