소스 검색

Update loader;

bjorn 6 년 전
부모
커밋
5913fc0f82
2개의 변경된 파일107개의 추가작업 그리고 1250개의 파일을 삭제
  1. 106 1244
      api/init.lua
  2. 1 6
      api/main.lua

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 106 - 1244
api/init.lua


+ 1 - 6
api/main.lua

@@ -1,10 +1,5 @@
 local serpent = require 'serpent'
 local serpent = require 'serpent'
 
 
--- Make sure init.lua can be required
-if not package.path:match('%./?/init%.lua') then
-  package.path = package.path .. ';./?/init.lua'
-end
-
 -- Helpers
 -- Helpers
 local function copy(t)
 local function copy(t)
   if type(t) ~= 'table' then return t end
   if type(t) ~= 'table' then return t end
@@ -193,7 +188,7 @@ local function processObject(path, parent)
 end
 end
 
 
 local function processModule(path)
 local function processModule(path)
-  local module = require(path .. '.init')
+  local module = require(path .. '.init') -- So we avoid requiring the module itself
 
 
   module.key = module.external and path:match('[^/]+$') or path:gsub('/', '.')
   module.key = module.external and path:match('[^/]+$') or path:gsub('/', '.')
   module.name = module.external and module.key or module.key:match('[^%.]+$')
   module.name = module.external and module.key or module.key:match('[^%.]+$')

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.