From cca3d72aae8f8ab92ad7cbf0c47e151b03d1c070 Mon Sep 17 00:00:00 2001 From: kom-senapati Date: Sat, 1 Feb 2025 09:12:45 +0530 Subject: [PATCH] fix: convert index.ts file extension to .tsx during cloning --- cli/clone/register.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cli/clone/register.ts b/cli/clone/register.ts index 930062c..9c1a381 100644 --- a/cli/clone/register.ts +++ b/cli/clone/register.ts @@ -75,7 +75,9 @@ export const registerClone = (program: Command) => { }) .json() - const fullPath = path.join(dirPath, filePath) + let fullPath = path.join(dirPath, filePath) + if (filePath === "index.ts") + fullPath = fullPath.replace(".ts", ".tsx") const dirName = path.dirname(fullPath) // Create nested directories if they don't exist