-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
feat(cli): A bit smarter cli #823
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
@Bekacru is attempting to deploy a commit to the shadcn-pro Team on Vercel. A member of the Team first needs to authorize it. |
Hi @Bekacru. You're right, those kind of issues are more and more frequent. I need to test your solution but it looks promising. Thank you 💪. |
Just tested it out and it works very well. Just to complete your work could you please run this command: pnpm format:write Because when running the |
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shadcn 👍
@Bekacru Awesome work! Now that we have docs for several frameworks, I wonder if we can auto-detect framework and provide better defaults for the CLI? |
@shadcn thanks! yeah that's possible. I think most of them use similar naming like app, pages, and components, as well as the folder alias is the same so we only need to tweak them slightly for each of them. Do u want me to work on that? |
If you got time, yes please! |
I should also have time these days. I’ll see what I can do. 💪 |
on it 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. I suggest just few changes.
@Bekacru quick update here. This is looking good. I'll review and get this merged this week. |
I started testing this and it looks like we need to put in some work. We need to update the helpers so that config is read from |
I'm not sure if this is what you're looking for, but adde cwd to all helper path resolvers in the same way as you did for getConfig. |
@Bekacru We shipped automatic detection in the cli. We're doing this on a framework-basis. I'm going to close this issue as done. Feel free to reopen if you have any questions. Thanks for your work on this PR. Appreciate it. |
Hey @shadcn and @dan5py I was seeing issues like these https://github.com/shadcn/ui/issues/818 appear repeatedly. The issue, I believe, stems from using constant initial values on the cli, so I figured it would make sense to offer better initial values based on project info. I'm not sure whether you guys are working on it with more features, but since it's not a difficult task, I thought I'd give it a shot.