[Feature,Discussion]: Use in monorepos
I'm wondering how I can use Builder in a monorepo. (also, debating if I should, or just stick with separate repos and just share the archetype).
Maybe I can have each package of my project as git submodules in the main repo, and use another tool like bolt to run the builder command in each submodule? I'm not sure if that'll be a maintenance hassle though (managing submodules). I'm also not sure how that will affect achetypes that process.cwd() to get the root. If if the monorepo task runner uses exec, then maybe it'll work.
Does Builder have sub-project features? (if not, that'd be an awesome feature, as alternative to Lerna, Bolt, etc)
@trusktr -- I haven't worked a lot with monorepos, but my co-workers have on a lot of projects now, so I'd definitely be interested in builder support for them if it makes sense. I don't really have a good idea of what features specifically we'd need to add?
You could either identify things for us to hash out here on the ticket, or maybe create a minimal repository that is a monorepo and just set up a skeleton for how you'd like things to work (even if they don't) and I can jump in and see what I can do.
Side note -- might not apply at all to any of your use cases, but we do have a generic purpose multi-repository tool (not specific to builder or archetypes), https://github.com/FormidableLabs/lank, that lets you efficiently:
- "link" together dependent projects without using file copying or symlinks
- execute multiple commands across projects in parallel.
It's what we normally use for development across our builder-controlled victory* projects. It's also what I use on non-builder projects when I'm changing 2+ projects at the same time.
Related: https://github.com/FormidableLabs/builder/pull/145 (dependencies can break with hoisted modules in Lerna monorepos).
It's what we normally use for development across our builder-controlled victory* projects. It's also what I use on non-builder projects when I'm changing 2+ projects at the same time.
Got a link to an example repo that contains lanked projects (builder-controlled)? (preferably with the more lanked projects the better, to get an idea of how it scales)