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
|
|
|
|
2016-01-13 09:21:24 -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
|
2016-01-13 09:21:24 -08:00
|
|
|
|
|
|
|
local function globalize(t)
|
|
|
|
for k, v in pairs(t) do
|
|
|
|
rawset(_G, k, v)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
return globalize{
|
|
|
|
depend = depend,
|
|
|
|
globalize = globalize,
|
|
|
|
}
|