This template is equipped with pre-configured tools to streamline your development process:
- Monorepo setup powered by TurboRepo
- TurboRepo is renowned for its efficient builds and caching mechanisms, minimizing unnecessary builds.
- TypeScript for static type checking
- ESLint for code linting
- Prettier for code formatting
- Plop-based code generator for effortlessly scaffolding new components
- Automatic rebranding functionality for this template
- Workflows facilitating testing, documentation, dependency updates, and deployment of your docs and packages
- Build setup capable of creating appropriate CJS and ESM builds to support React 18 server and client component exports from the same library
- Out-of-the-box support for SCSS modules for
lib
andpackages/shared
This TurboRepo comprises the following packages/examples, all written in TypeScript:
@example/nextjs
: a Next.js app@example/vite
: a Vite.js app@example/remix
: a Remix app@repo/eslint-config
:eslint
configurations (includeseslint-config-next
andeslint-config-prettier
)@repo/typescript-config
:tsconfig.json
s used throughout the monorepo@repo/shared
: An internal library of components utilized by the examplesreact18-loaders
: a React component library (The core package published to NPM)
Simply execute yarn turbo gen
and follow the prompts to automatically generate your new component along with a test file and dependency linking, adhering to best practices.
To build all apps and packages, execute the following command:
pnpm build
For development of all apps and packages, run:
pnpm dev
To execute unit tests, use:
pnpm test
Before creating a PR, ensure that linting passes and format the code properly with:
pnpm lint
and
pnpm format
Explore more about TurboRepo and Next.js through the following links:
- React and Next.js with TypeScript - an interactive Next.js course.
- The Game of Chess with Next.js, React, and TypeScript
- Tasks
- Caching
- Remote Caching
- Filtering
- Configuration Options
- CLI Usage
Quick tip: Remove all stale branches with
git branch --merged main | grep -v '^[ *]*main$' | xargs git branch -d
Consider enrolling in our courses or sponsoring our work.
with 💖 by Mayank Kumar Chaudhari