从示例开始

使用 create-turbo 来用你喜欢的工具引导一个示例。

Terminal
# 使用下面列出的示例
npx create-turbo@latest --example [example-name]
 
# 使用来自社区的 GitHub 仓库
npx create-turbo@latest --example [github-url]

核心团队维护的示例

以下示例由 Turborepo 核心团队维护。依赖项会尽可能保持最新,并且这些示例的 GitHub Issues 会被接受和处理。

NameDescription
BasicBasic monorepo example with two Next.js applications
Kitchen sinkMultiple frameworks, both frontend and backend
Non-monorepoA standalone application using Turborepo
Shell commandsA nearly empty Turborepo - useful for creating reproductions for GitHub Issues
SvelteKitMonorepo with multiple SvelteKit apps sharing a UI Library
TailwindCSSMonorepo with multiple Next.js apps sharing a UI library built with TailwindCSS

社区维护的示例

社区策划了一系列示例,展示了如何在 Turborepo 中使用常见工具和库。要使用其中一个示例引导你的单体仓库,请使用 --example 标志:

Good to know: 

这些示例的 GitHub Issues 将被关闭。如果你发现问题,请提交包含修复的拉取请求。

NameDescription
Design SystemUnify your site's look and feel by sharing a design system across multiple apps
AngularMinimal Turborepo example for learning the fundamentals
Yarn BerryMonorepo example using Yarn Berry (Yarn 3)
ChangesetsConfigured to publish packages via Changesets
DockerMonorepo with an Express API and a Next.js App deployed with Docker utilizing turbo prune
GatsbyMonorepo with a Gatsby.js and a Next.js app both sharing a UI Library
Nest.jsMonorepo with Nest.js
npm workspacesMonorepo example using NPM workspaces
PrismaMonorepo with a Next.js App fully configured with Prisma
React NativeSimple React Native & Next.js monorepo with a shared UI library
RollupMonorepo with a single Next.js app sharing a UI library bundled with Rollup
Solid.jsMonorepo example with SolidJS applications
typeormMonorepo with a Next.js App fully configured with typeorm
ViteMonorepo with multiple Vanilla JS apps bundled with Vite, sharing a UI Library
Vite + ReactMonorepo example with Vite and React
VitestMonorepo example with Vitest for testing
Vue/NuxtMonorepo with Vue and Nuxt, sharing a UI Library
YarnMonorepo example using Yarn workspaces