-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add Lerna example #182
Add Lerna example #182
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/vercel/turbo-site/7mw7AChP5HZj7EaSTPN2PjXHTCy2 |
@christianjuth Thanks, I was looking for something like this so I could get started with Turborepo. A question—how would you go about adding a |
@dakshshah96 for my repo, I have packages that depend on other packages. For example, I have a Tic Tac Toe solver that depends on a minimax package I wrote. But if you don't want to make everything a package that gets published to npm, I would create a second packages folder for packages that don't get published (this naming is confusing since everything is a package). Let's call this second packages folder Basically, your root repo would have something like this:
The {
"name": "root",
"private": true,
"workspaces": [
"packages/*",
"common/*", // add this to my example
]
} This would allow you to import Don't forget to add BuildingFor packages under |
Closing in favor of #269 as this is going to be more widely applicable for the use case. Appreciate this as a starting point! Thank you! |
Overview
This PR adds a Lerna example with TypeScript, SWC, Jest, and Nodemon already configured.
I'm already using all of these together in my Lerna monorepo, and this example takes the configuration I use and strips it down to just what you need to get started.
I'm sure the example will need a few improvements, but I can't stress how much this toolchain has improved my Lerna workflow. I would love to see this merged so others can try it themselves!
A couple of things I'm not sure about:
Checkbox indicates the decision I went with: check=agree, no check=disagree
yarn run release)
npx rimraf...
)These are all things I do in my own Lerna + TS + Turborepo, but they are more opinionated, so I'm not sure if I should include them.