radix-vue / shadcn-vue

Vue port of shadcn-ui
https://www.shadcn-vue.com/
MIT License
3.51k stars 203 forks source link

refactor: restructure cli commands to support different frameworks templates #618

Open MuhammadM1998 opened 1 week ago

MuhammadM1998 commented 1 week ago

πŸ”— Linked issue

570

❓ Type of change

πŸ“š Description

POC of #570. This PR just extracts the vue-specific code init, add, diff commands into their respective commands in commands/frameworks/vue folder and update the imports accordingly. No other changes were made for easier reviewing.

Remarks:

πŸ“Έ Screenshots (if appropriate)

πŸ“ Checklist

MuhammadM1998 commented 1 week ago

@sadeghbarati Tests are passing but can you help confirming everything works as expected πŸ™

sadeghbarati commented 1 week ago

Sure, I appreciate the effort you put into ❀️‍πŸ”₯

Will test tomorrow πŸ™Œ

sadeghbarati commented 1 week ago

https://stackblitz.com/edit/vitejs-vite-1fjqkm?file=package.json

@MuhammadM1998 Sry for the late test, I tested the CLI the seems to have problem with the add command init command is working well but add command still repeat the init command even though the component.json is exists

image

MuhammadM1998 commented 1 week ago

Thanks for testing πŸ™ I'll see whats wrong and retest

MuhammadM1998 commented 1 week ago

@sadeghbarati It was always running promptForConfig which should only run in init. It's fixed now and running as expected. Screenshot 2024-06-24 124609