Skip to content
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

Monorepo setup #17

Open
KevinBatdorf opened this issue Aug 11, 2022 · 2 comments
Open

Monorepo setup #17

KevinBatdorf opened this issue Aug 11, 2022 · 2 comments

Comments

@KevinBatdorf
Copy link

Might be worth exploring setting up a monorepo for agency or larger product type development.

Two popular tools

NX: https://nx.dev/
Overview of NX: https://egghead.io/courses/scale-react-development-with-nx-4038

Turborepo: https://turborepo.org/

NX is the successor to Lerna, which Gutenberg uses. So you can get an idea of how it works if you think about WP.

Why?

Essentially for code sharing and faster/effecient builds.

Imagine you're an agency that has 4 plugins, 3 themes, a desktop app, a website, and a few backend apps. Sharing code between all of these while maintaining separate build and release workflows is a pain. A monorepo solves that.

Create block sets you up with a primitive monorepo in that it will build multiple blocks for you. It stops there though. It also sets you up to release the blocks as a single plugin.

Create block could start building out similar features the other tools provide, OR someone could build (on stream) integrations for the other tools.

Building the perfect mono repo specific to WordPress would be nice though, but a lot of work.

@troychaplin
Copy link

+1 for me, I work with a monorepo now and want to learn more. Especially build tools in theme or individual plugins within the monorepo

@KevinBatdorf
Copy link
Author

I'll add that turborepo is something you use with a monorepo setup, like nx or pnpm workspaces. Here's an example repo: https://github.com/vercel/turbo/tree/main/examples/basic

That examples directory has a ton of examples too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants