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
118 migrateDocs: ->118 migrateDocs: ->
119 for slug in @settings.getDocs() when not @docs.findBy('slug', slug)119 for slug in @settings.getDocs() when not @docs.findBy('slug', slug)
120 needsSaving = true120 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)
122 if doc123 if doc
123 @disabledDocs.remove(doc)124 @disabledDocs.remove(doc)
124 @docs.add(doc)125 @docs.add(doc)
lib/app.rb+2−1
@@ -357,7 +357,8 @@ class App < Sinatra::Application · 356 unmodified lines
357 'angular~1.4' => 'angularjs~1.4',357 'angular~1.4' => 'angularjs~1.4',
358 'angular~1.3' => 'angularjs~1.3',358 'angular~1.3' => 'angularjs~1.3',
359 'angular~1.2' => 'angularjs~1.2',359 'angular~1.2' => 'angularjs~1.2',
360 'codeigniter~3.0' => 'codeigniter~3'360 'codeigniter~3.0' => 'codeigniter~3',
361 'webpack~2' => 'webpack'
361 }362 }
362 363
363 get %r{/([\w~\.%]+)(\-[\w\-]+)?(/.*)?} do |doc, type, rest|364 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
29 elsif slug.start_with?('api')29 elsif slug.start_with?('api')
30 css('.header[id] code').each_with_object [] do |node, entries|30 css('.header[id] code').each_with_object [] do |node, entries|
31 next if node.previous.try(:content).present?31 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']]
33 end33 end
34 else34 else
35 []35 []
lib/docs/scrapers/webpack.rb+4−4
@@ -3,10 +3,10 @@ module Docs · 2 unmodified lines
3 self.name = 'webpack'3 self.name = 'webpack'
4 self.type = 'webpack'4 self.type = 'webpack'
5 5
6 version '2' do6 version do
7 self.release = '2.6.1'7 self.release = '3.0.0'
8 self.base_url = 'https://webpack.js.org/'8 self.base_url = 'https://webpack.js.org/'
9 self.root_path = 'guides/get-started/'9 self.root_path = 'guides/'
10 self.initial_paths = %w(10 self.initial_paths = %w(
11 concepts/11 concepts/
12 guides/12 guides/
@@ -23,7 +23,7 @@ module Docs · 10 unmodified lines
23 html_filters.push 'webpack/clean_html', 'webpack/entries'23 html_filters.push 'webpack/clean_html', 'webpack/entries'
24 24
25 options[:container] = '.page'25 options[:container] = '.page'
26 options[:trailing_slash] = true26 options[:trailing_slash] = false
27 options[:only_patterns] = [27 options[:only_patterns] = [
28 /\Aconcepts\//,28 /\Aconcepts\//,
29 /\Aguides\//,29 /\Aguides\//,