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

[Doc] Installation documentation could mention the step for adding shadcn css and helper dependencies #27

Open
peterberkenbosch opened this issue Aug 7, 2023 · 6 comments

Comments

@peterberkenbosch
Copy link
Contributor

PR incoming, wanted to share my findings here and start discussion on how to improve wording.

When reading the installation docs, it's mentioning that the shadcn.css is installed. This is only done when you run the generator for a component though.

#> bin/rails g shadcn-ui
Checking for tailwind...
...tailwind found.
Checking for shadcn.css...
...copying shadcn.css to app/assets/stylesheets/shadcn.css
Checking for shadcn import...
Importing shadcn.css into application.tailwind.css...
Checking for shadcn.tailwind.js...
...copying shadcn.tailwind.js to config/shadcn.tailwind.js
Make sure to include shadcn.tailwind.js in your tailwind.config.js
const shadcnConfig = require('./shadcn.tailwind.js');
module.exports = {
  ...shadcnConfig,
};
Checking for component_helper.rb
...copying components_helper.rb app/helpers
rails generate shadcn-ui <component_name> [--remove] [rails_root_path]
....

How about adding an install generator that does the setup listed above?

@aviflombaum
Copy link
Owner

The generator that does the setup instead on install instead of with every component, makes total sense.

@bananatron
Copy link

I got hung up on this as well - it wasn't clear what step to take to generate shadcn.css (maybe I missed something obvious somewhere)

@technofreak
Copy link

Thanks for raising this issue. I was stuck at the same spot and if not this issue would have simply abandoned. 🙏 🌮

@sabrinagomesb
Copy link

@peterberkenbosch it's a great idea! I was stuck at the same spot, and this issue helped.

@SujayPrabhu96
Copy link

@peterberkenbosch I would be happy to contribute to this. Can I take this up?

@jeanpauldejong
Copy link

The generator that does the setup instead on install instead of with every component, makes total sense.

Well, you say that, but how do people know? We are now in 2025, I tried to use this for the first time. And there is no mention of this in the installation instructions. I've got live reload enabled, errors immediately appear of not finding this css file. The IDE is complaining as well. And no indication in the setup that you have to do this.

Love the project, love the work, but surely this should be included.

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

No branches or pull requests

7 participants