From 55fc8614fd737200258427405ca296b51710cfbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Thu, 14 Nov 2024 14:54:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E7=9B=AE=E5=BD=95=E4=B8=8B?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=20.luarc.json=20=E7=9A=84=E8=AF=9D=E5=B0=B1?= =?UTF-8?q?=E7=94=9F=E6=88=90=E4=B8=80=E4=BB=BD=E5=87=BA=E6=9D=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/globalScript.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/globalScript.ts b/src/globalScript.ts index ac8c46e..f322b48 100644 --- a/src/globalScript.ts +++ b/src/globalScript.ts @@ -98,6 +98,9 @@ export async function enable() { // 遍历所有地图,修改luarc文件 for (const map of y3.env.project!.maps) { let rcUri = vscode.Uri.joinPath(map.uri, 'script/.luarc.json'); + if (!await y3.fs.isExists(rcUri)) { + await y3.fs.copy(vscode.Uri.joinPath(globalY3Uri, '演示/项目配置/.luarc.json'), rcUri); + } await rcAddGlobalPath(rcUri); } // 生成全局的luarc文件