-
Notifications
You must be signed in to change notification settings - Fork 21.7k
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
rails new cool_app --minimal #39282
rails new cool_app --minimal #39282
Conversation
This is a good idea though I would suggest keeping Action Mailer. If I were just starting with Rails and had to deal with webpacker, I probably would have skipped it altogether. |
This can be set in your .railsrc file in Home directory, like default flags for running
|
Instead of skipping few of the frameworks by default, making command line interactive will be good.
|
@prathamesh-sonpatki sounds good, from the discussion I linked above, dhh mentioned 3 things, interactive mode, minimal mode, and add stacks back in if you left them out. Hopefully will tackle them in separate PR's, actually I'm going to mention that in the description above. If DHH drops the minimal for interactive, I will just go ahead and do that in this PR 👍 |
@IvanShamatov cool, this came out of the discussion linked in the description, we are going to provide an easy way to create a minimal rails app via the cli |
I like the idea of both minimal and interactive. Minimal really should be truly minimal, though. No webpacker, no Turbolinks, no action mailer, etc. Just action pack + active record (and the dependencies, railties + active support etc). |
This would simplify using Rails for first-time users. I’ve been using Rails since V2, and I may have given up if I’d had to deal with getting everything working with the complexities of webpacker. I did use ActionMailer from the beginning, but it is easy enough to add needed components.
… On May 14, 2020, at 1:54 PM, David Heinemeier Hansson ***@***.***> wrote:
I like the idea of both minimal and interactive. Minimal really should be truly minimal, though. No webpacker, no Turbolinks, no action mailer, etc. Just action pack + active record (and the dependencies, railties + active support etc).
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#39282 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABQTUITGVVZGEBCQYFWJZN3RRQV5ZANCNFSM4NATQJGA>.
|
The interactive mode would certainly benefit experienced developers, but it would help new/inexperienced people the most. Therefore instead of displaying only a module name (not necessarily previously known to a new developer), it would be good to display more information than that. And here we can have two possible solutions:
|
976022b
to
d16d1e8
Compare
What about to call it "classic" instead of "minimal? |
Classic gives it an air of cool that I'm not interested in. It's not about reminiscing of some glorious past. It's just "I want the bare minimum".
On Fri, May 15, 2020 at 9:04 PM "github.com" <notifications@github.com> wrote:
“
What about to call it "classic" instead of "minimal?”
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
This is a reflection of work that’s being coordinated in
https://discuss.rubyonrails.org/t/interactive-rails-new/74355 — the
—interactive flag has been discussed there as a separate feature idea.
--
--Betsy
|
I'd like us to really go minimal here, so let's add a few more skips:
But then, conversely, we should consider actually preconfiguring sprockets for JavaScript in this mode. |
We should also allow you to start from the negative --minimal base, and then add things back in. So --minimal --webpack=react should work and do the right thing. |
Did you want to remove these from --minimal too?
|
Let's just leave that stuff there for now. Although that listen gem looks like maybe it should have been part of skip spring? Thought that was what it was for? |
So no, we need the listen gem. |
Actually, on second thought, let's remove the rack-mini-profiler and the web-console. Maybe something like skip_dev_gems or something. Point of --minimal is to pare this all the way down. |
We use to the Will leave the listen gem 👍 |
5feb69d
to
f35386f
Compare
@dhh this is ready, let me know if there is anything I have missed? |
Will review and test. It looks good, just want to test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the rails --help
text be updated as part of this PR?
I've been stuck testing this because |
Sorry, I was stuck due to a recursive issue with bin/yarn (it'll loop on itself if you have ./bin in your path!). Now that I've run things through, it generally seems good, but I noticed that Active Job is still included by default. Let's take that out. |
Otherwise, I think we're good with a rebase to merge. |
Your app will not include any of the following: - action_cable - active_storage - action_text - action_mailer - action_mailbox - bootsnap - javascript - jbuilder - rack mini profiler - spring - system tests - turbolinks - webconsole - webpack Co-authored-by: dhh <david@loudthinking.com>
Cool, that's been done 👍 |
Awesome! |
❤️ |
Just wondering if it's worth to add what is remaining when using |
I can confirm that attempting to use this as a base, and selectively re-enabling libraries using $ rails -v
Rails 6.1.0 |
Summary
discussion: https://discuss.rubyonrails.org/t/interactive-rails-new/74355/50
rails new cool_app --minimal
A minimal rails stack to get you started, everything that is excluded:
rails new --minimal webpack=react
worksRails app I created using the minimal flag:
rails new cool_app_minimal --minimal
rails new cool_app_minimal_react --minimal --webpack=react
Want to help test out this PR? here is how:
gem uninstall rails
rake install
rails --version
which should beRails 6.1.0.alpha
rails new cool_app --minimal