Skip to content

Conversation

@stephannv
Copy link
Contributor

@stephannv stephannv commented Nov 18, 2024

The new component generator follows these steps:

  1. Generate main component (eg. app/components/ruby_ui/accordion.rb)
  2. Generate subcomponent files (eg. ruby_ui/accordion/accordion_trigger.rb)
  3. Copy js file if it exists (eg. app/javascript/controllers/ruby_ui/accordion_controller.js)
  4. Update stimulus controller manifest file
  5. Copy dependencies (eg. MaskedInput needs Input, so it will generate Input component using rails g ruby_ui:component Input.
Screenshot 2024-11-18 at 11 00 00

Next PRs I will handle js dependencies (eg. motion, maska) and Importmap compatibility.

@stephannv stephannv self-assigned this Nov 18, 2024
@stephannv stephannv merged commit 51b01ac into ruby-ui:main Nov 18, 2024
2 checks passed
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.

2 participants