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

Update to shadcn CLI 2.0 #61

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft

Update to shadcn CLI 2.0 #61

wants to merge 9 commits into from

Conversation

WarningImHack3r
Copy link
Owner

@WarningImHack3r WarningImHack3r commented Aug 31, 2024

Fixes #60.

Shadcn just released his 2.0 CLI, which adds a bunch of new features, mainly new ways of installing things and more things to install.

As a result, the components.json schema has been updated and the plugin is incompatible with it.

This PR aims to bridge the introduced gap by achieving feature parity without breaking other shadcn/ui implementations.

TODO list

This list will be updated as I uncover more details about what's changed and what I actually need to implement among all the changes. Shad isn’t known for his extensive technical changelogs and PR descriptions, so that might be a hard task, and I might miss some of them; let me know if that's the case!

  • Update the React configuration to support new aliases (hooks and lib)
  • Add a way to install through the "Add a component" section's search bar

    ...hooks, utils, themes, animations, routes and complex blocks with multi-file components...

  • Update Tailwind config per-component
  • Bump version, update changelog, and release

List still in progress

@WarningImHack3r WarningImHack3r self-assigned this Aug 31, 2024
Copy link
Contributor

github-actions bot commented Aug 31, 2024

Qodana Community for JVM

1 new problem were found

Inspection name Severity Problems
Unused symbol 🔶 Warning 1

💡 Qodana analysis was run in the pull request mode: only the changed files were checked

View the detailed Qodana report

To be able to view the detailed Qodana report, you can either:

To get *.log files or any other Qodana artifacts, run the action with upload-result option set to true,
so that the action will upload the files as the job artifacts:

      - name: 'Qodana Scan'
        uses: JetBrains/[email protected]
        with:
          upload-result: true
Contact Qodana team

Contact us at [email protected]

- Fix wrong tsconfig being resolved when having typescript to false with Svelte (fixes #62)
- Upgrade Gradle and dependencies
Copy link
Contributor

github-actions bot commented Sep 24, 2024

Qodana Community for JVM

1 new problem were found

Inspection name Severity Problems
Unused symbol 🔶 Warning 1

💡 Qodana analysis was run in the pull request mode: only the changed files were checked

View the detailed Qodana report

To be able to view the detailed Qodana report, you can either:

To get *.log files or any other Qodana artifacts, run the action with upload-result option set to true,
so that the action will upload the files as the job artifacts:

      - name: 'Qodana Scan'
        uses: JetBrains/[email protected]
        with:
          upload-result: true
Contact Qodana team

Contact us at [email protected]

@thelooter
Copy link

Whats the state on this? Any way I can help so we can make this land?

@WarningImHack3r
Copy link
Owner Author

Whats the state on this? Any way I can help so we can make this land?

Hi! I kinda got overwhelmed by all I have to implement, but as soon as I’ve got time (around the beginning of January) I get back to it. Seeing that people care helps, sorry for the delay

Any help is greatly appreciated though, tell me what you wanna start with!

@thelooter
Copy link

I'd be happy to start looking into the tailwind config part of it. The question that I have right now is if there is any way to release the config update already without the new features along the lines of blocks an v0. So Projects can at least use the plugin with existing features?

@WarningImHack3r
Copy link
Owner Author

I'd be happy to start looking into the tailwind config part of it. The question that I have right now is if there is any way to release the config update already without the new features along the lines of blocks an v0. So Projects can at least use the plugin with existing features?

Definitely! Start a new PR and I can release a patch of 0.8 with that
The plugin shouldn’t break on additional keys, it’s not flexible. (On the other hand, it can lead to think it’s compatible with the new versions as it doesn’t states otherwise, which can be weird to users)

@thelooter
Copy link

Looking through the component json for the button, I think it'll be the best course of action to create the lib folder and the content, which currently from what I can tell only consists of the utils.ts file and add the class-variance-authority package if it doesn't exist yet. Everything else should be mostly compatible

@thelooter
Copy link

Looking a bit more into it, we shouldn't have to add the lib/utils.ts file ourselves, as that is written by the init command of the cli, which should have already been ran

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support CLI 2.0
2 participants