Code: Select all
function recursiveRequire(folder,tree)
local tree = tree or {}
for i,file in ipairs(love.filesystem.getDirectoryItems(folder)) do
local filename = folder .. "/" .. file
if love.filesystem.isDirectory(filename) then
recursiveRequire(filename)
elseif file:match(".lua") == ".lua" then
require(filename:gsub(".lua",""))
end
end
return tree
end
so that i can reference it when using its functions, but with the recursive implementation above, i cant seem to refer to that module.local loader = require("love-loader")
Help