mirror of
https://github.com/notwa/mm
synced 2024-11-05 08:29:02 -08:00
Connor Olding
1acbaba58c
theres still a lot of work to do\nsince most scripts just set globals explicitly\nthis is still better than implied globals though
25 lines
488 B
Lua
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,
|
|
}
|