This Turborepo starter is maintained by the Turborepo core team.
Run the following command:
npx create-turbo@latestThis Turborepo includes the following packages/apps:
docs: a Next.js appweb: another Next.js app@repo/ui: a stub React component library shared by bothwebanddocsapplications@repo/eslint-config:eslintconfigurations (includeseslint-config-nextandeslint-config-prettier)@repo/typescript-config:tsconfig.jsons 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
To build all apps and packages, run the following command:
cd my-turborepo
pnpm build
To develop all apps and packages, run the following command:
cd my-turborepo
pnpm dev
Tip
Vercel Remote Cache is free for all plans. Get started today at vercel.com.
Turborepo can use a technique known as Remote Caching to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines.
By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can create one, then enter the following commands:
cd my-turborepo
npx turbo login
This will authenticate the Turborepo CLI with your Vercel account.
Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your Turborepo:
npx turbo link
Learn more about the power of Turborepo:
Adding tailwind in turborepo
To install tailwind :- first go to apps/user-app and in package.json add the following manually:-
"devDependencies": { "tailwindcss": "^3.0.0", "postcss": "^8.0.0", "autoprefixer": "^10.0.0" }
then run:-
after this following commands won't give any error..
then Update tailwind.config.js /** @type {import('tailwindcss').Config} / module.exports = { content: [ "./app/**/.{js,ts,jsx,tsx,mdx}", "./pages//*.{js,ts,jsx,tsx,mdx}", "./components//.{js,ts,jsx,tsx,mdx}", "../../packages/ui/**/.{js,ts,jsx,tsx,mdx}" ], theme: { extend: {}, }, plugins: [], }
Update global.css @tailwind base; @tailwind components; @tailwind utilities;
and this is for one folder like (new-payment/apps/web or /docs)
in pacakages folder create db folder in packags/db run npm init -y and npx tsc --init
in db/package.json rename name : @repo/--- in db/tsconfig.json copy over from packages/ui/tsconfig.json and rename extends to "...../base.json"/