-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Introduce railsrc
#728
Introduce railsrc
#728
Conversation
Would this make it more challenging to generate a Rails app that deviates from this standard? Since now it wouldn't just be picking a different generator or setting a command-line flag but would require modifying a dotfile (or potentially adding a local |
Perhaps out of scope for this PR but I wonder if there are other flags we'd want to set here? I know when I've generated new Rails apps I've always set the test framework to RSpec but IIRC @seanpdoyle might be trying to change that convention. |
I'm pretty sure a command line flag overrides the dotfile. |
Personally, I don't like Tailwind and I wouldn't reach for it by default. I think especially since you need to also run a build process for Tailwind |
I also wouldn't use tailwind by default. Tailwind can be useful later as a progressive enhancement: https://andy-bell.co.uk/i-used-tailwind-for-the-u-in-cube-css-and-i-liked-it/ But at the very start of a project I would be looking to disable it or remove it somehow to decrease dependencies, and speed up the build process. I'm not sure what this new tool is capable of scaffolding for us, but something I always do is create a folder structure under With something like:
...as children, plus a CSS reset. It doesn't have to be exactly this, but folders are much easier to remove or ignore than tailwind boilerplate. |
Just confirming this is true. Running However, there's always the option to run |
This could be a responsibility of suspenders, and captured in a generator which would be called on existing applications. I'll make a note of it when I started building it out. |
dc2fe6e
to
ba1c40e
Compare
Introduces [railsrc][1] in an effort to prepare for the eventual [removal of the suspenders executable][2]. With this change, calling `rails new` will automatically set the following options: ``` --database=postgresql ``` If you need to use another database, you can override this value like so: `rails new my_app --database=mysql` or `rails new my_app --no_rc` to skip this file all together [1]: https://github.com/rails/rails/blob/7f7f9df8641e35a076fe26bd097f6a1b22cb4e2d/railties/lib/rails/generators/rails/app/USAGE#L5C1-L7 [2]: https://github.com/thoughtbot/suspenders/blob/main/GOALS.md#from-here-to-there
ba1c40e
to
2d003ef
Compare
Follow-up to #728 In an effort to create parity with the [upcoming release of Suspenders][1], we pass the `--skip-test` argument when running [rails new][2]. This means if you're using our `railsrc` file, you would just need to pass the `-m` argument when generating a new Rails application. [1]: thoughtbot/suspenders#1135 [2]: https://guides.rubyonrails.org/command_line.html#rails-new
Follow-up to #728 In an effort to create parity with the [upcoming release of Suspenders][1], we pass the `--skip-test` argument when running [rails new][2]. This means if you're using our `railsrc` file, you would just need to pass the `-m` argument when generating a new Rails application. [1]: thoughtbot/suspenders#1135 [2]: https://guides.rubyonrails.org/command_line.html#rails-new
Introduces railsrc in an effort to prepare for the eventual removal of the
suspenders executable.
With this change, calling
rails new
will automatically set the followingoptions:
If you need to use another database, you can override this value like so:
rails new my_app --database=mysql
orrails new my_app --no_rc
to skip this file alltogether