diff options
-rw-r--r-- | meta/3rd/Jass/config.lua | 1 | ||||
-rw-r--r-- | meta/3rd/OpenResty/config.lua | 16 | ||||
-rw-r--r-- | script/library.lua | 14 |
3 files changed, 12 insertions, 19 deletions
diff --git a/meta/3rd/Jass/config.lua b/meta/3rd/Jass/config.lua index dd37d66c..8623494e 100644 --- a/meta/3rd/Jass/config.lua +++ b/meta/3rd/Jass/config.lua @@ -1,4 +1,3 @@ --- matched words words = {'jass.common'} configs = { { diff --git a/meta/3rd/OpenResty/config.lua b/meta/3rd/OpenResty/config.lua index 6cf1d8df..8bee2d10 100644 --- a/meta/3rd/OpenResty/config.lua +++ b/meta/3rd/OpenResty/config.lua @@ -1,7 +1,5 @@ --- list of matched words -words = {} -- list or matched file names -files = {} +files = {'resty/redis%.lua'} -- lsit of settings to be changed configs = { { @@ -9,16 +7,4 @@ configs = { action = 'set', value = 'LuaJIT', }, - { - key = 'Lua.diagnostics.globals', - action = 'add', - value = 'global1', - } } -for _, name in ipairs {'global2', 'global3', 'global4'} do - configs[#configs+1] = { - key = 'Lua.diagnostics.globals', - action = 'add', - value = name, - } -end diff --git a/script/library.lua b/script/library.lua index 21004ab6..3d52baea 100644 --- a/script/library.lua +++ b/script/library.lua @@ -259,6 +259,17 @@ local function loadSingle3rdConfig(libraryDir) cfg[k] = v end + if cfg.files then + for i, filename in ipairs(cfg.files) do + if plat.OS == 'Windows' then + filename = filename:lower():gsub('/', '\\') + else + filename = filename:gsub('\\', '/') + end + cfg.files[i] = filename + end + end + return cfg end @@ -361,9 +372,6 @@ local function check3rdByFileName(uri, configs) if cfg.files then for _, filename in ipairs(cfg.files) do await.delay() - if plat.OS == 'Windows' then - filename = filename:lower() - end if path:match(filename) then askFor3rd(cfg) return |