Monorepo
curl -sSL http://localhost:4321/downloads/fasnextro.tar.gz | tar -xz && ./setup.shbash <(curl -sSL http://localhost:4321/downloads/fasnextro.sh)cd fasnextrodocker compose down -vcd ..sudo rm -rf fasnextroclearls -lamonorepo.sh 925,3MB
Úprava Next.js (apps/next-app/package.json)
Hned po inicializaci Next.js ve skriptu (za řádek s rm -rf apps/next-app/.git) přidejte tento blok.
# Propojení Next.js s tRPC a databází# Přidáme závislosti přímo do package.jsoncat <<EOF > apps/next-app/package.json{ "name": "next-app", "version": "0.1.0", "private": true, "scripts": { "dev": "next dev -p 3001", "build": "next build", "start": "next start", "lint": "next lint" }, "dependencies": { "next": "latest", "react": "latest", "react-dom": "latest", "@repo/trpc": "workspace:*", "@repo/database": "workspace:*", "@trpc/client": "latest", "@trpc/server": "latest", "@trpc/react-query": "latest", "@tanstack/react-query": "latest" }, "devDependencies": { "typescript": "latest", "@types/node": "latest", "@types/react": "latest", "@types/react-dom": "latest", "postcss": "latest", "tailwindcss": "latest" }}EOFÚprava Astra (apps/astro-web/package.json)
Astro potřebuje totéž:
# Propojení Astro s tRPCcat <<EOF > apps/astro-web/package.json{ "name": "astro-web", "type": "module", "version": "0.0.1", "scripts": { "dev": "astro dev", "start": "astro dev", "build": "astro build", "preview": "astro preview", "astro": "astro" }, "dependencies": { "astro": "latest", "@astrojs/starlight": "latest", "sharp": "latest", "@repo/trpc": "workspace:*", "@repo/database": "workspace:*", "@trpc/client": "latest" }}EOFbash <(curl -sSL http://localhost:4321/downloads/monorepo.sh)