Skip to content

Instantly share code, notes, and snippets.

@kevinw
Created September 25, 2015 05:28
Show Gist options
  • Save kevinw/e8fe8984a665611a89dd to your computer and use it in GitHub Desktop.
Save kevinw/e8fe8984a665611a89dd to your computer and use it in GitHub Desktop.
_G['require'] = function(p)
res = nil
if not pcall(function()
res = _require(p)
end) then
if not pcall(function()
res = _require("generated/" .. p)
end) then
res = _require("lib/" ..p)
end
end
return res
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment