feat: integrate Turborepo for improved build and development workflow

- Added Turborepo configuration in turbo.json to streamline task management for development, building, linting, and formatting.
- Updated package.json scripts to utilize Turborepo for running development and build tasks across applications.
- Included .pnpm-workspace.yaml to define workspace structure for managing multiple applications.
- Enhanced .gitignore to exclude Turborepo's cache directory, ensuring cleaner repository management.
- Adjusted development scripts in apps/docs and apps/web to specify port numbers for local development.
This commit is contained in:
Daniel Luiz Alves
2025-07-02 15:44:07 -03:00
parent 75d6049b87
commit 0ff4661ccd
8 changed files with 10688 additions and 7 deletions

3
.gitignore vendored
View File

@@ -32,4 +32,7 @@ apps/server/dist/*
.env
data/
# Turborepo
.turbo/
node_modules/

View File

@@ -17,7 +17,7 @@
"packageManager": "pnpm@10.6.0",
"scripts": {
"build": "next build",
"dev": "next dev --turbo",
"dev": "next dev -p 3001",
"start": "next start",
"postinstall": "fumadocs-mdx",
"lint": "eslint \"src/**/*.+(ts|tsx)\"",
@@ -62,4 +62,4 @@
"tw-animate-css": "^1.2.8",
"typescript": "^5.8.3"
}
}
}

View File

@@ -14,7 +14,7 @@
"license": "BSD-2-Clause Copyright 2023 Kyantech",
"packageManager": "pnpm@10.6.0",
"scripts": {
"dev": "next dev --turbopack",
"dev": "next dev -p 3000",
"build": "next build",
"start": "next start",
"lint": "eslint \"src/**/*.+(ts|tsx)\"",
@@ -93,4 +93,4 @@
"tailwindcss": "4.1.11",
"typescript": "5.8.3"
}
}
}

View File

@@ -1,7 +1,9 @@
import Link from "next/link";
import { useTranslations } from "next-intl";
import { version } from "../../../package.json";
import packageJson from "../../../package.json";
const { version } = packageJson;
export function DefaultFooter() {
const t = useTranslations();

View File

@@ -5,9 +5,20 @@
"private": true,
"packageManager": "pnpm@10.6.0",
"scripts": {
"prepare": "git config core.hooksPath .husky && husky"
"prepare": "git config core.hooksPath .husky && husky",
"postinstall": "cd apps/server && npx prisma generate",
"dev": "turbo run dev",
"dev:ui": "turbo run dev --ui=tui",
"build": "turbo run build",
"lint": "turbo run lint",
"lint:fix": "turbo run lint:fix",
"format": "turbo run format",
"format:check": "turbo run format:check",
"type-check": "turbo run type-check",
"validate": "turbo run validate"
},
"devDependencies": {
"husky": "^9.1.7"
"husky": "^9.1.7",
"turbo": "^2.5.4"
}
}

10619
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

2
pnpm-workspace.yaml Normal file
View File

@@ -0,0 +1,2 @@
packages:
- "apps/*"

44
turbo.json Normal file
View File

@@ -0,0 +1,44 @@
{
"$schema": "./node_modules/turbo/schema.json",
"tasks": {
"dev": {
"cache": false,
"persistent": true,
"interactive": true
},
"build": {
"dependsOn": [
"^build"
],
"outputs": [
"dist/**",
".next/**"
]
},
"lint": {
"dependsOn": [
"^build"
]
},
"lint:fix": {
"dependsOn": [
"^build"
],
"cache": false
},
"format": {
"cache": false
},
"format:check": {},
"type-check": {
"dependsOn": [
"^build"
]
},
"validate": {
"dependsOn": [
"^build"
]
}
}
}