turborepo
Add Turborepo to Existing Project
Taken from here:
https://turbo.build/repo/docs/getting-started/add-to-project
# First install it globally: npm install turbo --global
Add turbo.json:
{
"$schema": "https://turbo.build/schema.json",
"pipeline": {
"build": {
"outputs": [".next/**", "!.next/cache/**"]
},
"type-check": {}
}
}
Add this to .gitignore:
.turbo
Now you can run build or dev:
# Build: turbo type-check build # Dev: turbo dev
Can login to enable use of remote cache so all devs use the same cache:
# Turn on: npx turbo link # Turn off: npx turbo unlink