从示例开始
使用 create-turbo
来用你喜欢的工具引导一个示例。
核心团队维护的示例
以下示例由 Turborepo 核心团队维护。依赖项会尽可能保持最新,并且这些示例的 GitHub Issues 会被接受和处理。
Name | Description |
---|---|
Basic | Basic monorepo example with two Next.js applications |
Kitchen sink | Multiple frameworks, both frontend and backend |
Non-monorepo | A standalone application using Turborepo |
Shell commands | A nearly empty Turborepo - useful for creating reproductions for GitHub Issues |
SvelteKit | Monorepo with multiple SvelteKit apps sharing a UI Library |
TailwindCSS | Monorepo with multiple Next.js apps sharing a UI library built with TailwindCSS |
社区维护的示例
社区策划了一系列示例,展示了如何在 Turborepo 中使用常见工具和库。要使用其中一个示例引导你的单体仓库,请使用 --example
标志:
Good to know:
这些示例的 GitHub Issues 将被关闭。如果你发现问题,请提交包含修复的拉取请求。
Name | Description |
---|---|
Design System | Unify your site's look and feel by sharing a design system across multiple apps |
Angular | Minimal Turborepo example for learning the fundamentals |
Yarn Berry | Monorepo example using Yarn Berry (Yarn 3) |
Changesets | Configured to publish packages via Changesets |
Docker | Monorepo with an Express API and a Next.js App deployed with Docker utilizing turbo prune |
Gatsby | Monorepo with a Gatsby.js and a Next.js app both sharing a UI Library |
Nest.js | Monorepo with Nest.js |
npm workspaces | Monorepo example using NPM workspaces |
Prisma | Monorepo with a Next.js App fully configured with Prisma |
React Native | Simple React Native & Next.js monorepo with a shared UI library |
Rollup | Monorepo with a single Next.js app sharing a UI library bundled with Rollup |
Solid.js | Monorepo example with SolidJS applications |
typeorm | Monorepo with a Next.js App fully configured with typeorm |
Vite | Monorepo with multiple Vanilla JS apps bundled with Vite, sharing a UI Library |
Vite + React | Monorepo example with Vite and React |
Vitest | Monorepo example with Vitest for testing |
Vue/Nuxt | Monorepo with Vue and Nuxt, sharing a UI Library |
Yarn | Monorepo example using Yarn workspaces |