Merge pull request #19 from wqferr/fix-init-lua

Fix init.lua
This commit is contained in:
Calvin Rose 2019-07-23 08:40:27 -05:00 committed by GitHub
commit 65de2a9c6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,6 @@
-- Helper Lua file for easy require if tiny-ecs is used as a git submodule or
-- folder. Not needed in many cases, including luarocks distribution.
local directory = (...):match("(.-)[^%.]+$")
return require(directory .. 'tiny')
local args = {...}
local directory = args[1]
return require(directory .. '.tiny')