ts-lua icon indicating copy to clipboard operation
ts-lua copied to clipboard

lua配置文件和逻辑文件分离

Open pengzhixi opened this issue 10 years ago • 1 comments

我把配置单独提出来放到config.lua,内容类似如下 local M = {} .... return M 然后在逻辑脚本里面用 local cfg = require "config" 逻辑脚本和配置文件在同一个目录下面,重启ats发现提示无法找到config.lua文件的操作,估计是因为config.lua不再LUA_PATH里面 不知道ATS有什么配置文件添加lua相关文件的路径么?

pengzhixi avatar Sep 01 '15 06:09 pengzhixi

试试ts.add_package_path看看如何

https://github.com/portl4t/ts-lua/wiki/Doc#tsadd_package_path

portl4t avatar Sep 02 '15 01:09 portl4t