Skip to content

Instantly share code, notes, and snippets.

@dvv
Created October 12, 2011 13:12
Show Gist options
  • Save dvv/1281194 to your computer and use it in GitHub Desktop.
Save dvv/1281194 to your computer and use it in GitHub Desktop.
an attempt at modules in luvit
-- hack require() lookup paths
local path = '?.lua'
for i = 1,4 do
path = path .. ';' .. ('../'):rep(i) .. 'lua_modules/?.lua'
end
package.path = path .. ';' .. package.path
package.cpath = path:gsub('%.lua', '.so') .. ';' .. package.cpath
--d('package paths', package.path, package.cpath)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment