History

Merge pull request #1386 from scherepn/love-update

Update LÖVE documentation

Simon Legner committed 5 years ago

Commit a705f2e2 parents 81abc5a 8c782fb5 files · +22 −10Browse files

Unified · Split

5 files
  1. assets/javascripts/templates/pages/about_tmpl.coffee +1 −1
  2. assets/stylesheets/pages/_love.scss +1 −0
  3. lib/docs/filters/love/clean_html.rb +5 −0
  4. lib/docs/filters/love/entries.rb +6 −2
  5. lib/docs/scrapers/love.rb +9 −7
assets/javascripts/templates/pages/about_tmpl.coffee+1−1
@@ -463,7 +463,7 @@ credits = [ · 462 unmodified lines
463463 'http://www.lua.org/license.html'
464464 ], [
465465 'LÖVE',
466− '2006-2016 LÖVE Development Team',
466+ '2006-2020 LÖVE Development Team',
467467 'GFDL',
468468 'http://www.gnu.org/copyleft/fdl.html'
469469 ], [
assets/stylesheets/pages/_love.scss+1−0
@@ -12,6 +12,7 @@ · 11 unmodified lines
1212 .smwtable { width: 100%; }
1313 .smwtable td:nth-last-child(2), .smwtable td:last-child { width: 2.5em; }
1414
15+ .cell-orange { background: var(--noteOrangeBackground); }
1516 .cell-green { background: var(--noteGreenBackground); }
1617 .cell-red { background: var(--noteRedBackground); }
1718 }
lib/docs/filters/love/clean_html.rb+5−0
@@ -45,6 +45,11 @@ module Docs · 44 unmodified lines
4545 node.remove
4646 end
4747
48+ css('img[src$="Deprecate.png"]').each do |node|
49+ node.parent['class'] = 'cell-orange'
50+ node.remove
51+ end
52+
4853 css('table, tr, td, th').each do |node|
4954 %w(style cellpadding cellspacing width height valign).each do |attribute|
5055 node.remove_attribute(attribute)
lib/docs/filters/love/entries.rb+6−2
@@ -2,23 +2,27 @@ module Docs · 1 unmodified line
22 class Love
33 class EntriesFilter < Docs::EntriesFilter
44 TYPES = {
5+ 'cdata' => 'Lua',
56 'require' => 'Lua',
67 'light_userdata' => 'Lua',
78 'value' => 'Lua',
89 'variable' => 'Lua',
910
1011 'Audio_Formats' => 'love.sound',
12+ 'Image_Formats' => 'love.graphics',
1113 'ImageFontFormat' => 'love.font',
1214 'BlendMode_Formulas' => 'love.graphics',
1315 'Shader_Variables' => 'love.graphics',
1416
17+ 'AttributeDataType' => 'love.graphics',
1518 'AreaSpreadDistribution' => 'love.graphics',
16− 'BodyType' => 'love.physics',
1719 'BufferMode' => 'love.filesystem',
1820 'CompressedFormat' => 'love.image',
21+ 'FilterType' => 'love.audio',
22+ 'ImageFlag' => 'love.graphics',
1923 'JoystickConstant' => 'love.joystick',
24+ 'MatrixLayout' => 'love.math',
2025 'ParticleInsertMode' => 'love.graphics',
21− 'String' => 'love',
2226 'TextureMode' => 'love.graphics'
2327 }
2428
lib/docs/scrapers/love.rb+9−7
@@ -3,15 +3,16 @@ module Docs · 2 unmodified lines
33 self.name = 'LÖVE'
44 self.slug = 'love'
55 self.type = 'love'
6− self.release = '0.10.2'
6+ self.release = '11.3'
77 self.base_url = 'https://love2d.org/wiki/'
88 self.root_path = 'Main_Page'
9− self.initial_paths = %w(love love.audio love.event love.filesystem love.font love.graphics
10− love.image love.joystick love.keyboard love.math love.mouse love.physics love.sound
11− love.system love.thread love.timer love.touch love.video love.window enet socket utf8)
9+ self.initial_paths = %w(love love.audio love.data love.event love.filesystem love.font
10+ love.graphics love.image love.joystick love.keyboard love.math love.mouse love.physics
11+ love.sound love.system love.thread love.timer love.touch love.video love.window lua-enet
12+ socket utf8)
1213 self.links = {
1314 home: 'https://love2d.org/',
14− code: 'https://bitbucket.org/rude/love'
15+ code: 'https://github.com/love2d/love'
1516 }
1617
1718 html_filters.push 'love/entries', 'love/clean_html', 'title'
@@ -32,11 +33,12 @@ module Docs · 14 unmodified lines
3233 options[:replace_paths] = {
3334 'Config_Files' => 'love.conf',
3435 'conf.lua' => 'love.conf',
35− 'lua-enet' => 'enet'
36+ 'enet' => 'lua-enet',
37+ 'ImageFormat' => 'ImageEncodeFormat'
3638 }
3739
3840 options[:attribution] = <<-HTML
39− &copy; 2006&ndash;2016 L&Ouml;VE Development Team<br>
41+ &copy; 2006&ndash;2020 L&Ouml;VE Development Team<br>
4042 Licensed under the GNU Free Documentation License, Version 1.3.
4143 HTML
4244

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t