Skip to content

Commit 3cf8fe7

Browse files
committed
[migration] Skip copying root index.mdx file from source
1 parent 9f245b4 commit 3cf8fe7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scripts/migration/src/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,12 @@ async function processDirectory(
272272
}
273273
await processDirectory(fullPath, options, config);
274274
} else if (entry.isFile() && /\.mdx?$/.test(entry.name)) {
275+
// Skip root index.mdx file
276+
const relativePath = path.relative(options.sourcePath || "", fullPath);
277+
if (relativePath === "index.mdx") {
278+
console.log(`Skipping root index file: ${entry.name}`);
279+
continue;
280+
}
275281
console.log(`Found MDX file: ${entry.name}`);
276282
try {
277283
await processFile(fullPath, options);

0 commit comments

Comments
 (0)