Features request
Hi @mattbrictson
I'm enjoying using nextgen and have some ideas want to share with you, so I open this. 😄
The changes:
- Make select more easier (by tty-prompt's options
cycle, enum, filter) - Underline the keywords in the questions for clearer display
- Group generators into:
basic, job_backend, workflows, checkers, code_snippets, gems, and they only appear after yes -> More detailed configuration
The adding:
- Job backend selection
solid_queue - "Second level question" -- to customize some generators after selecting
- tailwind: whether to add puma plugin
- solid_queue: whether to add puma plugin
- Code snippets selection
Current.user
Refactoring:
I extracted the helper methods from Commands::Create into Commands::Helpers to reduce the length of file.
But this caused a big git changes, may take some of your time, so sorry.
Thanks for the suggestions! It may take some time for me to review this.
In the meantime, I want to say up front that some of these enhancements, like soild_queue, I probably will not accept at this time. I have not used solid_queue (yet) and I would like to keep nextgen limited to libraries where I have first-hand experience.
That said, I see how there is value to extending nextgen to support more styles of Rails apps beyond my own preferences.
Do you have any ideas for how nextgen could accommodate plugins/extensions, or otherwise be customizable so that interested developers can add their own custom generators?
To customize enhancement selections, actually it's about customizing config/*.yml(and its generator templates).
I think we can add "style" argument for nextgen create. (or interactively ask "Which style?")
- "styles" presets here:
nextgen create myapp --style=style1-- It will apply the YML files (e.g.job.yml) underconfig/styles/style1. -
nextgen create myapp --style=LOCAL_PATH/my_style
To customize enhancement selections, actually it's about customizing
config/*.yml(and its generator templates).I think we can add "style" argument for
nextgen create. (or interactively ask "Which style?")
- "styles" presets here:
nextgen create myapp --style=style1-- It will apply the YML files (e.g.job.yml) underconfig/styles/style1.nextgen create myapp --style=LOCAL_PATH/my_style
Implemented.
@zhandao thanks again for your suggestions.
I'm still deciding which of your proposals to merge into nextgen.
For now, I would like to incorporate your idea to turn on the :cycle option for the select menus, as well as the improved color helpers. I opened PR #61 based on one of your commits. I plan on merging it if you have no objections.
I also like the idea of organizing the generators into groups. The number of generators is really long, and I think organizing them will make for a better experience. I'll look into incorporating your ideas on that.
@mattbrictson I have no objections 😄
Additionally, I've just found out that solid_queue will be the default job backend for Rails 8 (https://github.com/rails/rails/issues/50442), so the idea should perhaps be reconsidered after Rails 8 release.
EDIT: Moved to new issue at https://github.com/mattbrictson/nextgen/issues/110
EDIT: Moved to #110