This Turborepo has some additional tools already setup for you:
- TypeScript for static type checking
- ESLint for code linting
- Prettier for code formatting
This Turborepo includes the following packages/examples:
nextjs
: a Next.js appvite
: a Vite.js appeslint-config-custom
:eslint
configurations (includeseslint-config-next
andeslint-config-prettier
)tsconfig
:tsconfig.json
s used throughout the monorepo
To increase the visibility we have moved core library to lib
fork-me
: a React component library shared by bothnextjs
andvite
examples lives in./lib/fork-me
Each package/example is 100% TypeScript.
- just run
yarn turbo gen
and follow the propts to auto generate your new component with test file and dependency linking - follow best practices automatically
To build all apps and packages, run the following command:
cd fork-me
pnpm build
To develop all apps and packages, run the following command:
cd fork-me
pnpm dev
To run unit tests, run the following command:
cd fork-me
pnpm test
Before creating PR make sure lint is passing and also run formatter to properly format the code.
cd fork-me
pnpm lint
and
pnpm format
Learn more about Turborepo and Next.js:
- React and Next.js with TypeScript - an interactive Next.js course.
- The Game of Chess with Next.js, React and TypeScrypt
- Tasks
- Caching
- Remote Caching
- Filtering
- Configuration Options
- CLI Usage
A quick tip: Delete all stale branches
git branch --merged main | grep -v '^[ *]*main$' | xargs git branch -d
with 💖 by Mayank Kumar Chaudhari