Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: convert index.ts file extension to .tsx during cloning #49

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion cli/clone/register.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can't modify the files from the cloud (think of how many problems this would cause with version control), this issue is with the registry api storing package content in index.ts instead of index.tsx CC @imrishabh18

const dirName = path.dirname(fullPath)

// Create nested directories if they don't exist
Expand Down