1
0
Fork 0
mirror of https://github.com/notwa/mm synced 2024-11-05 03:19:02 -08:00
mm/Lua/lib/setup.lua

26 lines
488 B
Lua
Raw Normal View History

2016-01-12 15:54:42 -08:00
if _require then return end
_require = require
2015-05-25 21:24:29 -07:00
2016-01-12 15:54:42 -08:00
package.path = package.path..';./lib/?.lua'
2016-01-13 07:56:18 -08:00
package.path = package.path..';./lib/?/init.lua'
2016-01-12 15:54:42 -08:00
require "strict"
local function depend(path)
2015-05-15 21:55:11 -07:00
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,
}