changed the projects filesystem to use require() instead of loadfile()
currently preparing for a better package manager/installer
This commit is contained in:
10
Basalt/init.lua
Normal file
10
Basalt/init.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
local curDir = fs.getDir(table.pack(...)[2]) or ""
|
||||
|
||||
local defaultPath = package.path
|
||||
local format = "%s;/%s/?.lua;/%s/?/init.lua"
|
||||
package.path = string.format(format, package.path, curDir,curDir)..string.format(format, package.path, curDir.."/libraries",curDir.."/libraries")
|
||||
|
||||
local Basalt = require("main")
|
||||
package.path = defaultPath
|
||||
|
||||
return Basalt
|
||||
Reference in New Issue
Block a user