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

refactor: init CLI and @nuxtjs/color-mode module config #886

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

selemondev
Copy link
Contributor

@selemondev selemondev commented Nov 11, 2024

πŸ”— Linked issue

Fixes: #864

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This pull request is intended to do two things namely:

  1. Configure the @nuxtjs/color-mode module by adding the classSuffix: '' property as shown below:
    await installModule('@nuxtjs/color-mode', { classSuffix: '' }).

  2. Refactor the init CLI by ensuring that the shadcn-nuxt module is installed when the selected framework is Nuxt and the base dependencies as well.

πŸ“Έ Screenshots (if appropriate)

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

Copy link
Collaborator

@sadeghbarati sadeghbarati left a comment

Choose a reason for hiding this comment

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

@selemondev Thanks for the PR

Please add @nuxtjs/tailwindcss and @nuxtjs/color-mode to the shadcn-nuxt package.json dependencies.
Remove TypeScript from dependencies maybe?


Could you please revert the CLI init changes? because there is a manual installation module way

We don't need to force user to use shadcn-nuxt

Related #883

@selemondev
Copy link
Contributor Author

selemondev commented Nov 12, 2024

Hey there @sadeghbarati, thanks for taking the time to review my PR and leave a comment 😁. Let me know what you think of these:

  1. We let the developer choose their own CSS framework ( Tailwind or UnoCSS ). They will have to install it manually. This will solve issue [?]: v0.11 broke support for non-tailwind users (UnoCSS)Β #883 .

  2. When the framework selected is Nuxt, we will install all the base dependencies ( radix-vue, class-variance-authority, tailwind-merge etc ) and the shadcn-nuxt module automatically. The shadcn-nuxt module will be configured automatically and contain the @nuxtjs/color-mode module and it's configuration.

@zernonia
Copy link
Member

Thanks for the PR @selemondev , at first the idea of the shadcn-nuxt module is to support component autoImport. Now that with this PR it will install shadcn-nuxt, which will install @nuxtjs/tailwindcss, @nuxtjs/color-mode automatically. Perhaps we can look into updating the Nuxt Installation step ?

@selemondev
Copy link
Contributor Author

selemondev commented Nov 18, 2024

Thanks for the PR @selemondev , at first the idea of the shadcn-nuxt module is to support component autoImport. Now that with this PR it will install shadcn-nuxt, which will install @nuxtjs/tailwindcss, @nuxtjs/color-mode automatically. Perhaps we can look into updating the Nuxt Installation step ?

Hey @zernonia, I have updated the documentation. Here is what I have done:

  1. I have removed the @nuxtjs/tailwindcss module installation process but kept it in the manual installation process.
  2. The documentation changes walks the developers through the installation and configuration process for each module that is needed if they choose the manual installation process over installing the shadcn-nuxt module.

@sadeghbarati, for now we can work with automatically installing the @nuxtjs/tailwindcss module as TailwindCss is the default CSS framework used in Shadcn.

@brokuka
Copy link

brokuka commented Nov 29, 2024

Any news?

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.

[Bug]: @nuxtjs/color-mode has not being installed by shadcn-nuxt
4 participants