PROPSAL: Composability for apps / omakase, ‘rails add [gem]/remove —bare`

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

PROPSAL: Composability for apps / omakase, ‘rails add [gem]/remove —bare`

emile-2
I’ve been building apps/apis /w graphql and webpack for some time now. I usually start with a `rails new` then start removing all the files/frameworks i don’t need for decreasing the cognitive load.
Over time when i need it i start adding things like mailer/sprockets/maybe active job (if that app ever requires it)

For this i’d love a `—bare` option to rails that just makes a minimal rails app.

```
rails new myapp —bare
rails add sprockets
rails add activemailer
rails remove sprockets
rails add webpacker
```

The idea is that when you start with `—bare` you can pick and choose your frameworks and we provide a convention to add/remove/migrate them
Also you can even extend this to third parties, if they implement a convention or a hook.

```
rails add activeadmin 
```

The easiest way to do this would maybe delegate the `rails add activeadmin` to a rake task such as `rails g activeadmin:add` and `rails g activeadmin:remove`. 

Ofcourse we can make actual hooks and expose them via a railtie too.

The good thing is, we have a convention of adding/removing things to our rails app. We could even go so far of adding the gem to the Gemfile, but not sure if thats smart at the moment.

What do you all think?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.