20 lines
506 B
Lua
20 lines
506 B
Lua
-- Mostly from https://sr.ht/~benthor/absolutely-minimal-love2d-fennel/
|
|
-- But added the allowedGlobals=false option
|
|
|
|
fennel = require("fennel")
|
|
debug.traceback = fennel.traceback
|
|
table.insert(package.loaders, function(filename)
|
|
if love.filesystem.getInfo(filename) then
|
|
return function(...)
|
|
return fennel.eval(
|
|
love.filesystem.read(filename),
|
|
{ env = _G, filename = filename, allowedGlobals = false },
|
|
...
|
|
),
|
|
filename
|
|
end
|
|
end
|
|
end)
|
|
|
|
-- jump into Fennel
|
|
require("bootstrap.fnl")
|