aviflombaum / shadcn-rails

https://shadcn.rails-components.com
MIT License
467 stars 32 forks source link

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

Open peterberkenbosch opened 11 months ago

peterberkenbosch commented 11 months ago

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 commented 10 months ago

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

bananatron commented 1 month ago

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 commented 1 month ago

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