From 8eb7a66a34e2b5e71c433ebb8e1caa6cbc8ad81d Mon Sep 17 00:00:00 2001 From: Akira HIGUCHI Date: Wed, 24 Jun 2026 12:06:47 +0900 Subject: [PATCH] fix(docs-sync): exclude double-extension .*.md files from docs copy --- scripts/docs-sync/main.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/docs-sync/main.ts b/scripts/docs-sync/main.ts index 4d5491b..c682da1 100644 --- a/scripts/docs-sync/main.ts +++ b/scripts/docs-sync/main.ts @@ -13,6 +13,7 @@ interface SyncConfig { const ROOT = process.cwd(); const DOCS_ROOT = path.resolve(ROOT, "../../docs"); +const DOUBLE_EXT_MD = /\.[^.]+\.md$/; const configs: Record = { sdk: { @@ -124,7 +125,10 @@ const indexBackup = fs.existsSync(indexBackupPath) // 2. Clean and copy fs.rmSync(config.dst, { recursive: true, force: true }); fs.mkdirSync(config.dst, { recursive: true }); -fs.cpSync(config.src, config.dst, { recursive: true }); +fs.cpSync(config.src, config.dst, { + recursive: true, + filter: (src) => !DOUBLE_EXT_MD.test(path.basename(src)), +}); // 3. Remove unwanted files for (const file of config.removeFiles) {