Skip to content

Commit 1212982

Browse files
committed
Restructure examples and add project-management package
Moved project management example code from basic-usage to a new apps/project-management package, including its own package.json and tsconfig.json. Renamed basic-usage to servers/express, updated its configuration and dependencies to use the new project-management package, and adjusted workspace paths in the root package.json. This improves modularity and organization of example applications.
1 parent 5fe13ab commit 1212982

File tree

14 files changed

+51
-17
lines changed

14 files changed

+51
-17
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "@example/project-management",
3+
"version": "0.1.0",
4+
"main": "dist/index.js",
5+
"types": "dist/index.d.ts",
6+
"files": [
7+
"dist"
8+
],
9+
"scripts": {
10+
"build": "tsc && cp src/*.yml dist/"
11+
},
12+
"dependencies": {
13+
"@objectql/core": "^0.1.0"
14+
},
15+
"devDependencies": {
16+
"typescript": "^5.3.0"
17+
}
18+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import * as path from 'path';
2+
3+
// 导出包的根目录路径,供 ObjectQL 加载器使用
4+
export const packageDir = path.resolve(__dirname);

examples/basic-usage/src/packages/project-management/projects.action.ts renamed to examples/apps/project-management/src/projects.action.ts

File renamed without changes.

examples/basic-usage/src/packages/project-management/projects.hook.ts renamed to examples/apps/project-management/src/projects.hook.ts

File renamed without changes.

examples/basic-usage/src/packages/project-management/projects.object.yml renamed to examples/apps/project-management/src/projects.object.yml

File renamed without changes.

examples/basic-usage/src/packages/project-management/tasks.object.yml renamed to examples/apps/project-management/src/tasks.object.yml

File renamed without changes.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"extends": "../../../tsconfig.base.json",
3+
"compilerOptions": {
4+
"outDir": "./dist",
5+
"rootDir": "./src"
6+
},
7+
"include": ["src/**/*"]
8+
}

examples/basic-usage/tsconfig.json

Lines changed: 0 additions & 13 deletions
This file was deleted.
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"name": "basic-usage",
2+
"name": "@example/express",
33
"version": "0.1.0",
44
"private": true,
55
"scripts": {
6-
"build": "rm -rf dist && tsc -b && mkdir -p dist/objects && cp src/objects/*.yml dist/objects/",
6+
"build": "rm -rf dist tsconfig.tsbuildinfo && tsc",
77
"start": "node dist/index.js",
88
"test": "echo \"No tests specified\" && exit 0"
99
},
@@ -12,6 +12,7 @@
1212
"@objectql/driver-knex": "^0.1.0",
1313
"@objectql/driver-mongo": "^0.1.0",
1414
"@objectql/express": "^0.1.0",
15+
"@example/project-management": "*",
1516
"cors": "^2.8.5",
1617
"express": "^4.18.2"
1718
},
File renamed without changes.

0 commit comments

Comments
 (0)