为了端到端验证 Shrimp 框架,把 hand-admin 前端拷进 examples/basic-admin/web
作为临时演示用前端,@shrimp alias 直接指向同仓 src/,免构建。
修改要点:
- web/vite.config.ts: @shrimp 改成 ../../../src; proxy /admin-api 到 :3100
- web/tsconfig.json: 同步 @shrimp 路径; 删掉 hand-server-2 的 paths
- web/src/locales: 删掉 matter_*/zerobase 业务 key
- web/src/module: 删掉 matter_*/zerobase 业务 vue,只留 user/role/FieldRelativeTime
- examples/basic-admin/index.ts:
- mount 到 /admin-api/* 而不是 /api/*
- 加 /config /login /me 端点 (mock super-admin operator,固定 token)
- DemoShrimp 子类覆盖 getMenuTree 用模块自身 label
- MemoryShrimpCrud 的 getRelatedCrud 手动 wire 到 crudRegistry,
populate 才能跑 (后续 70→90 改进项)
curl 已验证 /config /login /me /product/list 全通,tagIds_label 正确旁挂。
42 lines
982 B
JSON
42 lines
982 B
JSON
{
|
|
"compilerOptions": {
|
|
"target": "esnext",
|
|
"module": "esnext",
|
|
"moduleResolution": "node",
|
|
"strict": true,
|
|
"noLib": false,
|
|
"forceConsistentCasingInFileNames": true,
|
|
"allowSyntheticDefaultImports": true,
|
|
"strictFunctionTypes": false,
|
|
"jsx": "preserve",
|
|
"baseUrl": ".",
|
|
"allowJs": true,
|
|
"sourceMap": true,
|
|
"esModuleInterop": true,
|
|
"resolveJsonModule": true,
|
|
"noUnusedLocals": true,
|
|
"noUnusedParameters": true,
|
|
"experimentalDecorators": true,
|
|
"lib": ["dom", "esnext"],
|
|
"noImplicitAny": false,
|
|
"skipLibCheck": true,
|
|
"types": ["vite/client"],
|
|
"removeComments": true,
|
|
"paths": {
|
|
"@/*": ["src/*"],
|
|
"@shrimp/*": ["../../../src/*"],
|
|
"#/*": ["types/*"]
|
|
}
|
|
},
|
|
"include": [
|
|
"src/**/*.ts",
|
|
"src/**/*.d.ts",
|
|
"src/**/*.tsx",
|
|
"src/**/*.vue",
|
|
"types/**/*.d.ts",
|
|
"types/**/*.ts",
|
|
"vite.config.ts"
|
|
],
|
|
"exclude": ["node_modules", "dist", "**/*.js"]
|
|
}
|