Skip to content

Commit 7136304

Browse files
feat: add build and start scripts for frontend and backend (#143)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added dedicated commands for building and starting both the frontend and backend, offering improved operational clarity and separation between environments. - **Chores** - Refined task dependencies and command configurations to enhance performance, streamline development workflows, and simplify maintenance. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent 48ddc99 commit 7136304

File tree

6 files changed

+31
-4
lines changed

6 files changed

+31
-4
lines changed

backend/package.json

+2
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@
88
"packageManager": "pnpm@9.1.0",
99
"scripts": {
1010
"build": "nest build",
11+
"build:backend": "pnpm build",
1112
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
1213
"lint": "ts-prune \"{src,apps,libs,test}/**/*.ts\" && eslint \"{src,apps,libs,test}/**/*.ts\" --fix ",
1314
"start": "nest start",
1415
"start:dev": "NODE_OPTIONS=\"--experimental-specifier-resolution=node\" nest start --watch",
16+
"start:backend": "pnpm start",
1517
"dev": "pnpm start:dev",
1618
"dev:backend": "pnpm start:dev",
1719
"start:debug": "nest start --debug --watch",

codefox-common/package.json

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
],
2020
"scripts": {
2121
"build": "pnpm run build:cjs && pnpm run build:esm && pnpm run build:types",
22+
"build:frontend": "pnpm run build",
23+
"build:backend": "pnpm run build",
2224
"build:cjs": "tsc -p tsconfig.cjs.json",
2325
"build:esm": "tsc -p tsconfig.esm.json",
2426
"build:types": "tsc -p tsconfig.types.json",

frontend/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
"private": true,
55
"scripts": {
66
"build": "next build",
7+
"build:frontend": "next build",
78
"dev": "next dev",
8-
"start:dev": "next dev",
9+
"start:frontend": "next start",
910
"start:dev-watch": "tmuxinator start -p .tmuxinator/build.yml",
1011
"dev:watch": "tmuxinator start -p .tmuxinator/dev.yml",
1112
"start": "next start",

llm-server/package.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
"type": "module",
66
"scripts": {
77
"start": "NODE_OPTIONS='--enable-source-maps' nodemon --watch \"src/**/*.ts\" --exec \"tsx\" src/main.ts",
8+
"start:backend": "pnpm start",
89
"dev": "NODE_OPTIONS='--enable-source-maps' nodemon --watch \"src/**/*.ts\" --exec \"tsx\" src/main.ts",
910
"dev:backend": "pnpm dev",
10-
"build": " tsc",
11+
"build": "tsc",
12+
"build:backend": "pnpm build",
1113
"serve": "node --enable-source-maps dist/main.js",
12-
"format": "prettier --write \"src/**/*.ts\" ",
14+
"format": "prettier --write \"src/**/*.ts\"",
1315
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
1416
"test": "NODE_OPTIONS=--experimental-vm-modules jest --config jest.config.js",
1517
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --config jest.config.js --watch",

package.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,18 @@
77
"scripts": {
88
"build": "turbo build",
99
"build:common": "pnpm --filter codefox-common run build",
10+
"build:frontend": "turbo build:frontend",
11+
"build:backend": "turbo build:backend",
1012
"dev:turbo": "turbo dev",
1113
"dev": "tmuxinator start -p .tmuxinator/dev.yml",
1214
"lint": "eslint . --ext .js,.ts,.tsx",
1315
"format": "prettier --write .",
1416
"dev:backend": "turbo dev:backend",
1517
"test": "turbo test",
1618
"fix": "eslint . --ext .js,.ts,.tsx --fix",
17-
"start": "turbo start"
19+
"start": "turbo start",
20+
"start:frontend": "turbo start:frontend",
21+
"start:backend": "turbo start:backend"
1822
},
1923
"postinstall": "pnpm --filter codefox-common run build",
2024
"keywords": [],

turbo.json

+16
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,22 @@
2121
"start": {
2222
"dependsOn": ["^build"],
2323
"cache": false
24+
},
25+
"start:frontend": {
26+
"dependsOn": ["^build"],
27+
"cache": false
28+
},
29+
"start:backend": {
30+
"dependsOn": ["^build"],
31+
"cache": false
32+
},
33+
"build:frontend": {
34+
"dependsOn": ["^build:frontend"],
35+
"cache": true
36+
},
37+
"build:backend": {
38+
"dependsOn": ["^build:backend"],
39+
"cache": true
2440
}
2541
}
2642
}

0 commit comments

Comments
 (0)