From 2772c288519b21dc892b98a443ca800fe36c6245 Mon Sep 17 00:00:00 2001 From: Robin Date: Tue, 24 Sep 2024 16:04:49 +0000 Subject: [PATCH] chore: set output for projects --- README.md | 6 ++++-- apps/backend/tsconfig.build.json | 5 ++++- apps/frontend/vite.config.ts | 3 +++ {packages => libs}/.gitkeep | 0 nx.json | 4 ++++ 5 files changed, 15 insertions(+), 3 deletions(-) rename {packages => libs}/.gitkeep (100%) diff --git a/README.md b/README.md index 569bb7df..969ae833 100644 --- a/README.md +++ b/README.md @@ -28,5 +28,7 @@ All parts of the project live inside this monorepo. - [`backend`](./apps/backend/) - [`frontend`](./apps/frontend/) - [`mockup`](./apps/mockup/) -- Packages - - [`ui`](./packages/ui/): Common UI components are represented inside this package. +- Libs + - [`ui`](./libs/ui/): Common UI components are represented inside this package. + +Projects need be configured to output into the workspace `dist` folder. diff --git a/apps/backend/tsconfig.build.json b/apps/backend/tsconfig.build.json index 64f86c6b..4e2d0e8c 100644 --- a/apps/backend/tsconfig.build.json +++ b/apps/backend/tsconfig.build.json @@ -1,4 +1,7 @@ { "extends": "./tsconfig.json", - "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] + "exclude": ["node_modules", "test", "dist", "**/*spec.ts"], + "compilerOptions": { + "outDir": "../../dist/apps/backend" + } } diff --git a/apps/frontend/vite.config.ts b/apps/frontend/vite.config.ts index 0c4f2c1b..d6fbc82a 100644 --- a/apps/frontend/vite.config.ts +++ b/apps/frontend/vite.config.ts @@ -6,6 +6,9 @@ export default defineConfig({ server: { port: 3001 }, + build: { + outDir: "../../dist/apps/frontend", + }, clearScreen: false, plugins: [react()], }) diff --git a/packages/.gitkeep b/libs/.gitkeep similarity index 100% rename from packages/.gitkeep rename to libs/.gitkeep diff --git a/nx.json b/nx.json index 39a51e42..29fba026 100644 --- a/nx.json +++ b/nx.json @@ -1,6 +1,10 @@ { "$schema": "./node_modules/nx/schemas/nx-schema.json", "defaultBase": "main", + "workspaceLayout": { + "appsDir": "apps", + "libsDir": "libs" + }, "targetDefaults": { "build": { "dependsOn": ["^build"],