From b8f7c1ad2347958f251877d63c2e50e745629124 Mon Sep 17 00:00:00 2001 From: imsyy Date: Thu, 13 Jun 2024 10:12:06 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E5=8C=85=E5=90=AB=20ts=20=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/registry.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/registry.ts b/src/registry.ts index 996396d..5bf5137 100644 --- a/src/registry.ts +++ b/src/registry.ts @@ -32,7 +32,11 @@ const findTsFiles = (dirPath: string, allFiles: string[] = [], basePath: string if (stat.isDirectory()) { // 如果是文件夹,递归查找 findTsFiles(fullPath, allFiles, relativePath); - } else if (stat.isFile() && (item.endsWith(".ts") || item.endsWith(".js"))) { + } else if ( + stat.isFile() && + (item.endsWith(".ts") || item.endsWith(".js")) && + !item.endsWith(".d.ts") + ) { // 符合条件 allFiles.push(relativePath.replace(/\.(ts|js)$/, "")); }