Need help using engines as packs? Looking for a canonical public guide

This message was imported from the Ruby/Rails Modularity Slack server. Find more info in the import thread.

Message originally sent by slack user U72DOM2VVHS

Is there a canonical public guide for using engines as packs? The way we did it in Shopify Logistics felt really really nice but I never got a chance to dig deeply into how packs were created there

I think the best we have today (outside of shopify) is packs-rails from rubyatscale which allows you to say engine: true to get a packs that is also a Rails engine

does that solve your usecase?

Message originally sent by slack user U72DOM2VVHS

It might! So for this workflow would I do something like “bin/rails plugin new billing —mountable”, move it into my packs subdir, add the package.yml with that engine setting and optionally mount my routes back in the app’s route file?

I would not to that, because it creates so much stuff that you don’t need. No, simply create a barebones package and start adding the stuff that you want your engine to have

Use this for routes: https://github.com/rubyatscale/packs-rails#splitting-routes

Message originally sent by slack user U72DOM2VVHS

Word - i recognize that use case - I just meant if you specifically know you want a engine: true scenario, is that how you might spin it up? Or are you suggesting even for that pathway being more ~granular~ minimal?