History

Update CoffeeScript documentation (1.7.1)

Thibaut committed 12 years ago

Commit 722a0451 parent 948e2673 files · +19 −5Browse files

Unified · Split

3 files
  1. assets/javascripts/templates/pages/about_tmpl.coffee +1 −1
  2. lib/docs/filters/coffeescript/entries.rb +16 −2
  3. lib/docs/scrapers/coffeescript.rb +2 −2
assets/javascripts/templates/pages/about_tmpl.coffee+1−1
@@ -85,7 +85,7 @@ credits = [ · 84 unmodified lines
85 'https://raw.github.com/jashkenas/backbone/master/LICENSE'85 'https://raw.github.com/jashkenas/backbone/master/LICENSE'
86 ], [86 ], [
87 'CoffeeScript',87 'CoffeeScript',
88 '2009-2013 Jeremy Ashkenas',88 '2009-2014 Jeremy Ashkenas',
89 'MIT',89 'MIT',
90 'https://raw.github.com/jashkenas/coffee-script/master/LICENSE'90 'https://raw.github.com/jashkenas/coffee-script/master/LICENSE'
91 ], [91 ], [
lib/docs/filters/coffeescript/entries.rb+16−2
@@ -13,12 +13,14 @@ module Docs · 12 unmodified lines
13 ['... splats', 'splats', 'Language'],13 ['... splats', 'splats', 'Language'],
14 ['for...in', 'loops', 'Statements'],14 ['for...in', 'loops', 'Statements'],
15 ['for...in...by', 'loops', 'Statements'],15 ['for...in...by', 'loops', 'Statements'],
16 ['for...in...when', 'loops', 'Statements'],
16 ['for...of', 'loops', 'Statements'],17 ['for...of', 'loops', 'Statements'],
17 ['while', 'loops', 'Statements'],18 ['while', 'loops', 'Statements'],
18 ['until', 'loops', 'Statements'],19 ['until', 'loops', 'Statements'],
19 ['loop', 'loops', 'Statements'],20 ['loop', 'loops', 'Statements'],
20 ['do', 'loops', 'Statements'],21 ['do', 'loops', 'Statements'],
21 ['Array slicing and splicing', 'slices', 'Language'],22 ['Array slicing and splicing', 'slices', 'Language'],
23 ['Ranges', 'slices', 'Language'],
22 ['Expressions', 'expressions', 'Language'],24 ['Expressions', 'expressions', 'Language'],
23 ['?', 'the-existential-operator', 'Operators'],25 ['?', 'the-existential-operator', 'Operators'],
24 ['?=', 'the-existential-operator', 'Operators'],26 ['?=', 'the-existential-operator', 'Operators'],
@@ -35,8 +37,10 @@ module Docs · 10 unmodified lines
35 ['Chained comparisons', 'comparisons', 'Language'],37 ['Chained comparisons', 'comparisons', 'Language'],
36 ['#{} interpolation', 'strings', 'Language'],38 ['#{} interpolation', 'strings', 'Language'],
37 ['Block strings', 'strings', 'Language'],39 ['Block strings', 'strings', 'Language'],
40 ['"""', 'strings', 'Language'],
38 ['Block comments', 'strings', 'Language'],41 ['Block comments', 'strings', 'Language'],
39 ['Block regular expressions', 'regexes', 'Language'],42 ['###', 'strings', 'Language'],
43 ['Block regexes', 'regexes', 'Language'],
40 ['cake command', 'cake', 'Miscellaneous'],44 ['cake command', 'cake', 'Miscellaneous'],
41 ['Cakefile', 'cake', 'Miscellaneous'],45 ['Cakefile', 'cake', 'Miscellaneous'],
42 ['Source maps', 'source-maps', 'Miscellaneous']46 ['Source maps', 'source-maps', 'Miscellaneous']
@@ -49,7 +53,8 @@ module Docs · 6 unmodified lines
49 css('.definitions td:first-child > code').each do |node|53 css('.definitions td:first-child > code').each do |node|
50 node.content.split(', ').each do |name|54 node.content.split(', ').each do |name|
51 next if %w(true false yes no on off this).include?(name)55 next if %w(true false yes no on off this).include?(name)
52 id = name.parameterize56 name.sub! %r{\Aa (.+) b\z}, '\1'
57 id = name_to_id(name)
53 node['id'] = id58 node['id'] = id
54 entries << [name, id, 'Operators']59 entries << [name, id, 'Operators']
55 end60 end
@@ -57,6 +62,15 @@ module Docs · 1 unmodified line
57 62
58 entries63 entries
59 end64 end
65
66 def name_to_id(name)
67 case name
68 when '**' then 'pow'
69 when '//' then 'floor'
70 when '%%' then 'mod'
71 else name.parameterize
72 end
73 end
60 end74 end
61 end75 end
62end76end
lib/docs/scrapers/coffeescript.rb+2−2
@@ -2,7 +2,7 @@ module Docs · 1 unmodified line
2 class Coffeescript < UrlScraper2 class Coffeescript < UrlScraper
3 self.name = 'CoffeeScript'3 self.name = 'CoffeeScript'
4 self.type = 'coffeescript'4 self.type = 'coffeescript'
5 self.version = '1.6.3'5 self.version = '1.7.1'
6 self.base_url = 'http://coffeescript.org'6 self.base_url = 'http://coffeescript.org'
7 7
8 html_filters.push 'coffeescript/clean_html', 'coffeescript/entries', 'title'8 html_filters.push 'coffeescript/clean_html', 'coffeescript/entries', 'title'
@@ -12,7 +12,7 @@ module Docs · 3 unmodified lines
12 options[:skip_links] = true12 options[:skip_links] = true
13 13
14 options[:attribution] = <<-HTML14 options[:attribution] = <<-HTML
15 &copy; 2009&ndash;2013 Jeremy Ashkenas<br>15 &copy; 2009&ndash;2014 Jeremy Ashkenas<br>
16 Licensed under the MIT License.16 Licensed under the MIT License.
17 HTML17 HTML
18 end18 end