Skip to content

Commit ffe9849

Browse files
committed
更新tsconfig配置,添加对API和核心包的引用,优化项目结构
1 parent c3f0cc0 commit ffe9849

File tree

7 files changed

+25
-6
lines changed

7 files changed

+25
-6
lines changed

examples/apps/express/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"include": ["src/**/*"],
88
"references": [
99
{ "path": "../../../packages/core" },
10+
{ "path": "../../../packages/api" },
1011
{ "path": "../../../packages/driver-mongo" },
1112
{ "path": "../../../packages/driver-knex" }
1213
]

examples/apps/nestjs/tsconfig.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,12 @@
1919
"forceConsistentCasingInFileNames": false,
2020
"noFallthroughCasesInSwitch": false
2121
},
22-
"include": ["src/**/*"]
22+
"include": ["src/**/*"],
23+
"references": [
24+
{ "path": "../../../packages/core" },
25+
{ "path": "../../../packages/api" },
26+
{ "path": "../../../packages/driver-mongo" },
27+
{ "path": "../../../packages/driver-knex" },
28+
{ "path": "../../modules/project-management" }
29+
]
2330
}

examples/modules/project-management/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@
55
"rootDir": "./src",
66
"resolveJsonModule": true
77
},
8-
"include": ["src/**/*"]
8+
"include": ["src/**/*"],
9+
"references": [{ "path": "../../../packages/core" }]
910
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"dev": "npm run start:dev --workspace=@example/nestjs",
1111
"nestjs": "npm run start --workspace=@example/nestjs",
1212
"express": "npm run build --workspaces && npm start --workspace=@example/express",
13-
"build": "npm run build --workspaces",
13+
"build": "tsc -b && npm run build --workspaces",
1414
"test": "npm run test --workspaces",
1515
"changeset": "changeset",
1616
"version": "changeset version",

packages/api/tsconfig.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@
44
"outDir": "./dist",
55
"rootDir": "./src"
66
},
7-
"include": ["src/**/*"]
7+
"include": ["src/**/*"],
8+
"references": [
9+
{ "path": "../core" }
10+
]
811
}

packages/core/tsconfig.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@
44
"outDir": "./dist",
55
"rootDir": "./src"
66
},
7-
"include": ["src/**/*"]
7+
"include": ["src/**/*"],
8+
"references": [
9+
{ "path": "../metadata" }
10+
]
811
}

tsconfig.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
{
22
"files": [],
33
"references": [
4+
{ "path": "./packages/metadata" },
45
{ "path": "./packages/core" },
6+
{ "path": "./packages/api" },
57
{ "path": "./packages/driver-mongo" },
68
{ "path": "./packages/driver-knex" },
7-
{ "path": "./examples/basic-usage" }
9+
{ "path": "./examples/apps/express" },
10+
{ "path": "./examples/apps/nestjs" },
11+
{ "path": "./examples/modules/project-management" }
812
]
913
}

0 commit comments

Comments
 (0)