-
Notifications
You must be signed in to change notification settings - Fork 285
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
Turborepo migration #100
base: main
Are you sure you want to change the base?
Turborepo migration #100
Conversation
@jhavej is attempting to deploy a commit to the mftsio Team on Vercel. A member of the Team first needs to authorize it. |
@mfts Hi Marc, I just merged your |
Thanks @jhavej ! I want to merge a couple of ongoing PRs first (Team accounts, Versions), before I switch over to turborepo. I will keep this PR open for now because this will be the basis for the turborepo transition. |
I migrated the code structure to Turborepo by following these steps:
prisma
moved to thedatabase
package)The repo now uses
pnpm@8.8.0
(I assume it was npm before).You can launch the app by running
pnpm run dev
(install dependencies beforehand bypnpm run install
) anywhere within the repository.Other commands like
pnpm run dev --filter=web
orpnpm add -D some-dev-package --filter=ui
work out of the box.The codebase is also covered by Typescript and ESLint tests (shared config, see
packages
) - simply runpnpm run ts
orpnpm run lint
(the--filter
argument works here too). Prettier helps too.I added
husky
- its pre-commit script now containspnpm run lint && pnpm run ts
so it doesn't let anyone commit buggy code. We can also addpnpm run format
so the code is duly formatted by Prettier. If you want to skip this pre-commit script, simply add--no-verify
argument to thegit commit
command.The
ui
package isshadcn/ui
and uses the original config fromcomponents.json
- CLI should work too as expected.Known issues:
ESLint errors in the web app (the original Next.js app)
apps/web/.eslintignore
to ignore everything in apps/web just so ESLint tests pass (it wouldn't be an issue on localhost as it'd only affect husky's pre-commit tests ☝️ but it also causes failures during Vercel deployments).packages/eslint-config-custom/rules.js
- I use these rules in my projects but they are still too strict for papermark. Loosening these rules would be a solution too.Deployment:
I tried to deploy the app to Vercel -
AIRTABLE_API_KEY
is mandatory env so thegetInvestors()
function can fetch from Airtable - this raised an error, otherwise it looked good.Create a new project - Vercel needs Root Directory configuration for monorepo:
The next steps (optional):
pnpm run lint --filter=web
-> either fix them all or simply loosen the rules.ui
)If anything, ping me at X or here.
👋