git clone <https://github.com/bytaesu/turborepo-nextjs-shadcn-ui.git>
cd turborepo-nextjs-shadcn-ui
code .
- /apps/new-app → /apps/your-app
- /apps/your-app/package.json
- "name": "new-app",
+ "name": "your-app",
pnpm i
- Done.
cd packages/ui
pnpm dlx shadcn@latest add <component>
// or //
pnpm run ui add <component>
Next.js version 14 is still being used because many UI packages do not yet have stable support for React 19.
- create-next-app
pnpm dlx create-next-app@14 apps/new-app
- package.json
{
"name": "new-app",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
+ "@repo/ui": "workspace:*",
"react": "^18",
"react-dom": "^18",
"next": "14.2.16"
},
"devDependencies": {
+ "@repo/eslint-config": "workspace:*",
+ "@repo/typescript-config": "workspace:*",
"typescript": "^5",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"postcss": "^8",
"tailwindcss": "^3.4.1",
+ "autoprefixer": "^10",
"eslint": "^8",
"eslint-config-next": "14.2.16"
}
}
- tsconfig.json
{
+ "extends": "@repo/typescript-config/nextjs.json",
"compilerOptions": {
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"plugins": [
{
"name": "next"
}
],
"paths": {
"@/*": ["./src/*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}
- tailwind.config.ts
+ export * from "@repo/ui/tailwind.config";
- postcss.config.mjs
+ export { default } from "@repo/ui/postcss.config";
- eslintric.json → eslintric.js
/** @type {import("eslint").Linter.Config} */
+ module.exports = {
root: true,
extends: ["@repo/eslint-config/next.js"],
parser: "@typescript-eslint/parser",
parserOptions: {
project: true,
},
};
- layout.tsx
- import "./globals.css"
+ import "@repo/ui/globals.css"
turbo gen workspace
-> ? What type of workspace should be added? package
turborepo-nextjs-shadcn-ui's People
Forkers
mrkheirkhahRecommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.