1
0
Fork 0
mirror of https://github.com/notwa/mm synced 2024-11-05 04:29:03 -08:00
mm/Lua/lib/setup.lua
Connor Olding 1acbaba58c be super strict about globals
theres still a lot of work to do\nsince most scripts just set globals explicitly\nthis is still better than implied globals though
2016-01-13 09:21:24 -08:00

25 lines
488 B
Lua

if _require then return end
_require = require
package.path = package.path..';./lib/?.lua'
package.path = package.path..';./lib/?/init.lua'
require "strict"
local function depend(path)
if package and package.loaded and package.loaded[path] then
package.loaded[path] = nil
end
return _require(path)
end
local function globalize(t)
for k, v in pairs(t) do
rawset(_G, k, v)
end
end
return globalize{
depend = depend,
globalize = globalize,
}