|
@@ -169,6 +169,8 @@ local function processObject(path, parent)
|
|
|
end
|
|
|
end
|
|
|
|
|
|
+ table.sort(object.methods, function(a, b) return a.key < b.key end)
|
|
|
+
|
|
|
return object
|
|
|
end
|
|
|
|
|
@@ -209,6 +211,10 @@ local function processModule(path)
|
|
|
end
|
|
|
end
|
|
|
|
|
|
+ table.sort(module.functions, function(a, b) return a.key < b.key end)
|
|
|
+ table.sort(module.objects, function(a, b) return a.key < b.key end)
|
|
|
+ table.sort(module.enums, function(a, b) return a.key < b.key end)
|
|
|
+
|
|
|
return module
|
|
|
end
|
|
|
|
|
@@ -235,6 +241,10 @@ function lovr.load()
|
|
|
table.insert(api.callbacks, processFunction(callbacks .. '/' .. file:gsub('%.lua', ''), api.modules[1]))
|
|
|
end
|
|
|
|
|
|
+ -- Sort
|
|
|
+ table.sort(api.modules, function(a, b) return a.key < b.key end)
|
|
|
+ table.sort(api.callbacks, function(a, b) return a.key < b.key end)
|
|
|
+
|
|
|
-- Serialize
|
|
|
local file = io.open(lovr.filesystem.getSource() .. '/init.lua', 'w')
|
|
|
assert(file, 'Could not open init.lua for writing')
|