History

Update webpack documentation (3.0.0)

Thibaut Courouble committed 9 years ago

Commit 4bc31ad1 parent c34dbc04 files · +9 −7Browse files

Unified · Split

4 files
  1. assets/javascripts/app/app.coffee +2 −1
  2. lib/app.rb +2 −1
  3. lib/docs/filters/webpack/entries.rb +1 −1
  4. lib/docs/scrapers/webpack.rb +4 −4
assets/javascripts/app/app.coffee+2−1
@@ -118,7 +118,8 @@ · 117 unmodified lines
118118 migrateDocs: ->
119119 for slug in @settings.getDocs() when not @docs.findBy('slug', slug)
120120 needsSaving = true
121− doc = @disabledDocs.findBy('slug_without_version', slug)
121+ doc = @disabledDocs.findBy('slug', 'webpack') if slug == 'webpack~2'
122+ doc ||= @disabledDocs.findBy('slug_without_version', slug)
122123 if doc
123124 @disabledDocs.remove(doc)
124125 @docs.add(doc)
lib/app.rb+2−1
@@ -357,7 +357,8 @@ class App < Sinatra::Application · 356 unmodified lines
357357 'angular~1.4' => 'angularjs~1.4',
358358 'angular~1.3' => 'angularjs~1.3',
359359 'angular~1.2' => 'angularjs~1.2',
360− 'codeigniter~3.0' => 'codeigniter~3'
360+ 'codeigniter~3.0' => 'codeigniter~3',
361+ 'webpack~2' => 'webpack'
361362 }
362363
363364 get %r{/([\w~\.%]+)(\-[\w\-]+)?(/.*)?} do |doc, type, rest|
lib/docs/filters/webpack/entries.rb+1−1
@@ -29,7 +29,7 @@ module Docs · 28 unmodified lines
2929 elsif slug.start_with?('api')
3030 css('.header[id] code').each_with_object [] do |node, entries|
3131 next if node.previous.try(:content).present?
32− entries << ["#{self.name}: #{node.content.sub(/\(.*\)/, '()')}", node.parent['id']]
32+ entries << ["#{self.name.split(':').first}: #{node.content.sub(/\(.*\)/, '()')}", node.parent['id']]
3333 end
3434 else
3535 []
lib/docs/scrapers/webpack.rb+4−4
@@ -3,10 +3,10 @@ module Docs · 2 unmodified lines
33 self.name = 'webpack'
44 self.type = 'webpack'
55
6− version '2' do
7− self.release = '2.6.1'
6+ version do
7+ self.release = '3.0.0'
88 self.base_url = 'https://webpack.js.org/'
9− self.root_path = 'guides/get-started/'
9+ self.root_path = 'guides/'
1010 self.initial_paths = %w(
1111 concepts/
1212 guides/
@@ -23,7 +23,7 @@ module Docs · 10 unmodified lines
2323 html_filters.push 'webpack/clean_html', 'webpack/entries'
2424
2525 options[:container] = '.page'
26− options[:trailing_slash] = true
26+ options[:trailing_slash] = false
2727 options[:only_patterns] = [
2828 /\Aconcepts\//,
2929 /\Aguides\//,