mirror of
https://github.com/imsyy/DailyHotApi.git
synced 2026-01-12 13:14:55 +08:00
🐞 fix: 修复错误包含 ts 文件
This commit is contained in:
@@ -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)$/, ""));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user