This is an example for typescript based monorepo using turborepo and yarn berry PnP.
This turborepo uses Yarn as a package manager. It includes the following packages and apps:
@apps/docs
: a documentation site using Nextra@apps/server
: a simple Koa NodeJS server including redis based rate limitter@apps/web
: a NextJS web application using TailwindCSS@packages/ui
: a stub React component library shared by both@apps/web
and@apps/docs
applications@packages/eslint-config
:eslint
configurations@packages/tsconfig
:tsconfig.json
s used throughout the monorepo
Each package/app is 100% TypeScript.
This turborepo has some additional tools already setup for you:
- TypeScript for static type checking
- ESLint for code linting
- Prettier for code formatting
- Install VSCode Extensions
- run the following command:
yarn prepare
To build all apps and packages, run the following command:
cd my-turborepo
yarn run build
To develop all apps and packages, run the following command:
cd my-turborepo
yarn run dev