@tbox.cn/app-template-h5 1.0.0-alpha.1 → 1.0.0-alpha.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/._.gitignore +0 -0
- package/._.npmignore +0 -0
- package/._.nvmrc +0 -0
- package/._AGENTS.md +0 -0
- package/._LEGAL.md +0 -0
- package/._LICENSE +0 -0
- package/._README.md +0 -0
- package/._eslint.config.mjs +0 -0
- package/._package.json +0 -0
- package/._pnpm-lock.template.yaml +0 -0
- package/._pnpm-workspace.template.yaml +0 -0
- package/._tsconfig.base.json +0 -0
- package/.gitignore +9 -1
- package/.tbox/._app.json +0 -0
- package/.tbox/app.json +1 -1
- package/AGENTS.md +18 -10
- package/README.md +2 -1
- package/apps/._AGENTS.md +0 -0
- package/apps/AGENTS.md +2 -6
- package/apps/client/._index.html +0 -0
- package/apps/client/._package.json +0 -0
- package/apps/client/._tsconfig.json +0 -0
- package/apps/client/._vite.config.ts +0 -0
- package/apps/client/._vitest.config.ts +0 -0
- package/apps/client/package.json +5 -2
- package/apps/client/src/._app.config.ts +0 -0
- package/apps/client/src/._vite-env.d.ts +0 -0
- package/apps/client/src/app.config.ts +10 -0
- package/apps/client/src/pages/._page.tsx +0 -0
- package/apps/client/src/pages/page.tsx +9 -5
- package/apps/client/src/styles/._tailwind.css +0 -0
- package/apps/client/src/styles/tailwind.css +101 -0
- package/apps/client/vite.config.ts +8 -2
- package/apps/server/._package.json +0 -0
- package/apps/server/._tsconfig.json +0 -0
- package/apps/server/._tsup.config.ts +0 -0
- package/apps/server/._vitest.config.ts +0 -0
- package/apps/server/src/._app.ts +0 -0
- package/apps/server/src/._dev.ts +0 -0
- package/apps/server/src/._index.ts +0 -0
- package/apps/server/src/dev.ts +2 -2
- package/apps/server/src/functions/._greet.server.ts +0 -0
- package/apps/server/src/index.ts +2 -2
- package/apps/server/tests/._app.test.ts +0 -0
- package/modules/._.gitkeep +0 -0
- package/package.json +18 -10
- package/packages/shared/._AGENTS.md +0 -0
- package/packages/shared/._package.json +0 -0
- package/packages/shared/._tsconfig.json +0 -0
- package/packages/shared/src/._index.ts +0 -0
- package/pnpm-lock.template.yaml +529 -171
- package/pnpm-workspace.template.yaml +11 -8
- package/scripts/._build.sh +0 -0
- package/scripts/._check-css-target.mjs +0 -0
- package/scripts/._check.mjs +0 -0
- package/scripts/._dev.sh +0 -0
- package/scripts/._generate.mjs +0 -0
- package/scripts/._start.sh +0 -0
- package/scripts/._stop.sh +0 -0
- package/scripts/check-css-target.mjs +54 -0
- package/apps/client/src/platform/bootstrap.ts +0 -11
- package/apps/client/src/platform/mount-page.tsx +0 -26
- package/apps/client/src/styles/base.css +0 -21
- package/scripts/agents-check.mjs +0 -23
- package/scripts/agents-sync.mjs +0 -9
package/._.gitignore
ADDED
|
Binary file
|
package/._.npmignore
ADDED
|
Binary file
|
package/._.nvmrc
ADDED
|
Binary file
|
package/._AGENTS.md
ADDED
|
Binary file
|
package/._LEGAL.md
ADDED
|
Binary file
|
package/._LICENSE
ADDED
|
Binary file
|
package/._README.md
ADDED
|
Binary file
|
|
Binary file
|
package/._package.json
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/.gitignore
CHANGED
|
@@ -8,7 +8,8 @@ dist-ssr
|
|
|
8
8
|
*.log
|
|
9
9
|
.pnpm-store
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
# 客户端生成 IR(构建期 disposable——可删除重建;勿手写、勿提交)
|
|
12
|
+
apps/client/.tbox-gen/
|
|
12
13
|
.tbox-dist-staging-*
|
|
13
14
|
.tbox-dist-backup-*
|
|
14
15
|
|
|
@@ -19,3 +20,10 @@ apps/client/.tbox-gen
|
|
|
19
20
|
.env
|
|
20
21
|
.env.*
|
|
21
22
|
!.env.example
|
|
23
|
+
|
|
24
|
+
# 与开发预览隔离的生产构建入口
|
|
25
|
+
.tbox-gen-build/
|
|
26
|
+
|
|
27
|
+
# 本地开发软链(dev 启动器种植;仅 .gitkeep 占位目录,其余靠 symlink 注入)
|
|
28
|
+
modules/*
|
|
29
|
+
!modules/.gitkeep
|
package/.tbox/._app.json
ADDED
|
Binary file
|
package/.tbox/app.json
CHANGED
package/AGENTS.md
CHANGED
|
@@ -1,25 +1,33 @@
|
|
|
1
1
|
# tbox-app 1.0 Web 应用
|
|
2
2
|
|
|
3
|
-
这是一个 `
|
|
4
|
-
|
|
5
|
-
<!-- tbox:agents:begin -->
|
|
6
|
-
# tbox-app
|
|
7
|
-
|
|
8
|
-
这是一个 tbox-app 1.0 应用。应用代码根是 `apps/`(`apps/client` + `apps/server`)。
|
|
3
|
+
这是一个 tbox-app 1.0 Web 全栈应用(`app.json` 的 `appKind` 为 `web`)。应用代码根是 `apps/`(`apps/client` + `apps/server`)。
|
|
9
4
|
|
|
10
5
|
- `apps/client/src/pages/**/page.tsx`:页面;目录即 URL;页面元数据用 inline `export const page`。
|
|
6
|
+
- `apps/client/src/app.config.ts`:客户端装配真源(样式入口/apiBaseUrl);生成 entry 第一个 import 它。
|
|
7
|
+
- 样式只写 Tailwind 工具类(入口 `apps/client/src/styles/tailwind.css`:语义色 + 4px 标度 + px 圆角/字号;不引 preflight,不新建样式文件)。
|
|
8
|
+
- `.tbox-gen` 是生成 IR:不要手写、不要 import;默认不要创建 `apps/client/src/entry.tsx`。
|
|
11
9
|
- `apps/server/src/functions/*.server.ts`:函数;文件名即 `/api/fn/<id>`。
|
|
12
|
-
- `apps/server/src/tools/*.tool.ts`、`skills/*.skill.ts`、`cards/*.card.ts`:应用级原语(仅 agent)。
|
|
13
10
|
- `packages/shared/`:跨端 DTO(`@app/shared`),只放纯类型与常量。
|
|
14
11
|
- `modules/<id>/`:可复用/可分发模块;必须有 `tbox.module.json`。
|
|
15
12
|
- 不要创建 `app/`、`apps/client/src/modules.ts`、`routes.json`、`page.config.jsonc`。
|
|
16
13
|
|
|
17
|
-
修改后先运行 `pnpm check`,再按需运行 `pnpm typecheck
|
|
14
|
+
修改后先运行 `pnpm check`,再按需运行 `pnpm typecheck`。沙箱/无端口环境不要跑 `pnpm dev`/`pnpm build`(长驻进程 + Vite + 端口)。
|
|
15
|
+
|
|
16
|
+
- 工具链:pnpm `>=11 <12`(推荐 11.1.0);旧版本 `pnpm install` 直接失败。
|
|
18
17
|
|
|
19
18
|
## 应用类型:web
|
|
20
19
|
|
|
21
|
-
本应用只有页面、函数与共享 DTO。不要创建 `tools/`、`skills/`、`cards/`,不要引入 agent
|
|
22
|
-
|
|
20
|
+
本应用只有页面、函数与共享 DTO。不要创建 `tools/`、`skills/`、`cards/`,不要引入 agent-sdk 系列包或卡片预览——本应用不是对话式 agent 应用。
|
|
21
|
+
|
|
22
|
+
## 模块
|
|
23
|
+
|
|
24
|
+
模块只在需要复用、分发或自定义安装后源码时创建。
|
|
25
|
+
|
|
26
|
+
- 本地模块:`modules/<id>/`,无 `package.json`。
|
|
27
|
+
- Vendored 模块:`modules/<id>/`,有 `package.json` 与 `tbox.upstream`。
|
|
28
|
+
- 两种模块都必须有 `tbox.module.json`。
|
|
29
|
+
- 模块入口:`src/server/index.ts` 导出 `serverModule`;`src/client/index.ts` 导出 `clientModule`。
|
|
30
|
+
- 模块只注册,不解析;跨模块经 `ctx`。
|
|
23
31
|
|
|
24
32
|
## 端形态决策
|
|
25
33
|
|
package/README.md
CHANGED
|
@@ -4,6 +4,8 @@ tbox-app 1.0 Web 模板(`appKind: web`)。应用代码根 `apps/`(client +
|
|
|
4
4
|
|
|
5
5
|
单页最小种子:只保留根页面与一个 `greet` 函数,先把端到端链路跑通,再按需加页面与模块。
|
|
6
6
|
|
|
7
|
+
> 工具链:pnpm `>=11 <12`(推荐 11.1.0);旧版本 `pnpm install` 直接失败(workspace overrides 自 pnpm 10.5.1 起生效)。
|
|
8
|
+
|
|
7
9
|
## 快速开始
|
|
8
10
|
|
|
9
11
|
```sh
|
|
@@ -31,7 +33,6 @@ modules/<id>/ # A-lite 模块
|
|
|
31
33
|
pnpm check
|
|
32
34
|
pnpm typecheck
|
|
33
35
|
pnpm build
|
|
34
|
-
pnpm agents:check
|
|
35
36
|
```
|
|
36
37
|
|
|
37
38
|
`pnpm build` 生成 `apps/client/.tbox-gen`,再构建 `apps/client/dist` 与 `apps/server/dist`。生产启动 `pnpm start`。
|
package/apps/._AGENTS.md
ADDED
|
Binary file
|
package/apps/AGENTS.md
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
# 应用代码
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
# 应用代码
|
|
5
|
-
|
|
6
|
-
- 页面:`apps/client/src/pages/**/page.tsx`。
|
|
3
|
+
- 页面:`apps/client/src/pages/**/page.tsx`;客户端装配真源是 `apps/client/src/app.config.ts`。
|
|
7
4
|
- 函数:`apps/server/src/functions/*.server.ts`,直接 import 使用。
|
|
8
5
|
- HTTP:`request`;不要新增第二套 HTTP 客户端。
|
|
9
6
|
- 共享 DTO:`packages/shared/`,导入 `@app/shared`。
|
|
@@ -12,6 +9,5 @@
|
|
|
12
9
|
|
|
13
10
|
## web 面
|
|
14
11
|
|
|
15
|
-
- 不创建 agent
|
|
12
|
+
- 不创建 agent 应用专属目录(`tools/`、`skills/`、`cards/`)。
|
|
16
13
|
- 页面只依赖 `@tbox.cn/app-sdk-client` 与共享 DTO。
|
|
17
|
-
<!-- tbox:agents:end -->
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/apps/client/package.json
CHANGED
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"typecheck": "tsc --noEmit",
|
|
8
|
-
"test": "vitest run --passWithNoTests"
|
|
8
|
+
"test": "vitest run --passWithNoTests",
|
|
9
|
+
"build": "vite build"
|
|
9
10
|
},
|
|
10
11
|
"dependencies": {
|
|
11
12
|
"@app/shared": "file:../../packages/shared",
|
|
@@ -21,6 +22,8 @@
|
|
|
21
22
|
"happy-dom": "catalog:",
|
|
22
23
|
"typescript": "catalog:",
|
|
23
24
|
"vite": "catalog:",
|
|
24
|
-
"vitest": "catalog:"
|
|
25
|
+
"vitest": "catalog:",
|
|
26
|
+
"tailwindcss": "catalog:",
|
|
27
|
+
"@tailwindcss/vite": "catalog:"
|
|
25
28
|
}
|
|
26
29
|
}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 客户端装配真源:样式入口(tailwind.css:投影 + 文档级重置)+ 环境值。
|
|
3
|
+
* 页面由生成 entry 经 startApp 挂载;错误边界/启动兜底由 SDK 统一提供。
|
|
4
|
+
*/
|
|
5
|
+
import type { AppConfig } from '@tbox.cn/app-sdk-client/app';
|
|
6
|
+
import './styles/tailwind.css';
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
apiBaseUrl: import.meta.env.VITE_API_URL as string | undefined,
|
|
10
|
+
} satisfies AppConfig;
|
|
Binary file
|
|
@@ -21,13 +21,17 @@ export default function HomePage() {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
return (
|
|
24
|
-
<main
|
|
25
|
-
<h1>tbox-app</h1>
|
|
26
|
-
<p>页面即路由,函数即接口。</p>
|
|
27
|
-
<button
|
|
24
|
+
<main className="mx-auto max-w-content px-8 py-8">
|
|
25
|
+
<h1 className="text-2xl font-semibold">tbox-app</h1>
|
|
26
|
+
<p className="mt-2 text-sm text-muted-foreground">页面即路由,函数即接口。</p>
|
|
27
|
+
<button
|
|
28
|
+
type="button"
|
|
29
|
+
className="mt-4 cursor-pointer rounded-md border-0 bg-primary px-4 py-2 text-sm font-medium text-primary-foreground [font-family:inherit] hover:bg-primary-dark"
|
|
30
|
+
onClick={() => void callGreet()}
|
|
31
|
+
>
|
|
28
32
|
调用 greet
|
|
29
33
|
</button>
|
|
30
|
-
{message ? <p role="status">{message}</p> : null}
|
|
34
|
+
{message ? <p role="status" className="mt-4 rounded-md border border-border bg-card px-3 py-2 text-sm">{message}</p> : null}
|
|
31
35
|
</main>
|
|
32
36
|
);
|
|
33
37
|
}
|
|
Binary file
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tailwind 入口(与 agent 两个模板同一形态):只引 theme 与 utilities,不引 preflight。
|
|
3
|
+
*
|
|
4
|
+
* - 本模板是 Web 全栈(无设计契约),故在此定义一套最小语义色板;工具类是唯一写法;
|
|
5
|
+
* - 圆角/字号命名空间先清空再用 px 补齐(默认档位是 rem);
|
|
6
|
+
* - `@layer base` 只保留文档级重置(原 styles/base.css),组件样式一律写工具类。
|
|
7
|
+
*/
|
|
8
|
+
/* 显式层序:base 层(基座重置)必须在 utilities 之前,工具类才能覆写它 */
|
|
9
|
+
@layer theme, base, components, utilities;
|
|
10
|
+
|
|
11
|
+
@import "tailwindcss/theme.css" layer(theme) theme(reference);
|
|
12
|
+
@import "tailwindcss/utilities.css" layer(utilities) source(none);
|
|
13
|
+
|
|
14
|
+
@source "../../src";
|
|
15
|
+
|
|
16
|
+
@theme inline {
|
|
17
|
+
/* 颜色:清空默认调色板,只留语义名(改品牌只改这里或覆写 --color-*) */
|
|
18
|
+
--color-*: initial;
|
|
19
|
+
--color-background: #f7f8fa;
|
|
20
|
+
--color-foreground: #1f2329;
|
|
21
|
+
--color-card: #ffffff;
|
|
22
|
+
--color-muted: #f2f3f5;
|
|
23
|
+
--color-muted-foreground: #646a73;
|
|
24
|
+
--color-border: #e5e6eb;
|
|
25
|
+
--color-primary: #1677ff;
|
|
26
|
+
--color-primary-dark: #0958d9;
|
|
27
|
+
--color-primary-foreground: #ffffff;
|
|
28
|
+
--color-destructive: #d4380d;
|
|
29
|
+
--color-success: #14804a;
|
|
30
|
+
--color-warning: #a65f00;
|
|
31
|
+
|
|
32
|
+
/* 圆角:物理 px 阶梯(禁 rem) */
|
|
33
|
+
--radius-*: initial;
|
|
34
|
+
--radius-xs: 4px;
|
|
35
|
+
--radius-sm: 6px;
|
|
36
|
+
--radius-md: 8px;
|
|
37
|
+
--radius-lg: 12px;
|
|
38
|
+
--radius-xl: 16px;
|
|
39
|
+
--radius-2xl: 20px;
|
|
40
|
+
--radius-3xl: 24px;
|
|
41
|
+
|
|
42
|
+
/* 间距:1 单位 = 4px */
|
|
43
|
+
/* 断点用 px:默认档位是 rem;本模板无动态根字号,统一物理 px */
|
|
44
|
+
--breakpoint-sm: 640px;
|
|
45
|
+
--breakpoint-md: 768px;
|
|
46
|
+
--breakpoint-lg: 1024px;
|
|
47
|
+
--breakpoint-xl: 1280px;
|
|
48
|
+
--breakpoint-2xl: 1536px;
|
|
49
|
+
|
|
50
|
+
--spacing: 4px;
|
|
51
|
+
|
|
52
|
+
/* 字号:清空命名空间后用 px 补齐,档位 12/14/16/18/20/24/30/36 */
|
|
53
|
+
--text-*: initial;
|
|
54
|
+
--text-xs: 12px;
|
|
55
|
+
--text-xs--line-height: 1.5;
|
|
56
|
+
--text-sm: 14px;
|
|
57
|
+
--text-sm--line-height: 1.5;
|
|
58
|
+
--text-base: 16px;
|
|
59
|
+
--text-base--line-height: 1.5;
|
|
60
|
+
--text-lg: 18px;
|
|
61
|
+
--text-lg--line-height: 1.5;
|
|
62
|
+
--text-xl: 20px;
|
|
63
|
+
--text-xl--line-height: 1.4;
|
|
64
|
+
--text-2xl: 24px;
|
|
65
|
+
--text-2xl--line-height: 1.35;
|
|
66
|
+
--text-3xl: 30px;
|
|
67
|
+
--text-3xl--line-height: 1.2;
|
|
68
|
+
--text-4xl: 36px;
|
|
69
|
+
--text-4xl--line-height: 1.2;
|
|
70
|
+
|
|
71
|
+
--container-content: 720px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* 文档级重置(原 styles/base.css):只放 html/body/#root,不放组件样式 */
|
|
75
|
+
@layer base {
|
|
76
|
+
:root {
|
|
77
|
+
color-scheme: light;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
* {
|
|
81
|
+
box-sizing: border-box;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
html,
|
|
85
|
+
body,
|
|
86
|
+
#root {
|
|
87
|
+
min-height: 100%;
|
|
88
|
+
margin: 0;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
body {
|
|
92
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
93
|
+
color: var(--color-foreground);
|
|
94
|
+
background: var(--color-background);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* preflight 未引入:标题与段落统一归零,间距交给工具类 */
|
|
98
|
+
h1, h2, h3, h4, h5, h6, p, dl, dd, dt, ul, ol {
|
|
99
|
+
margin: 0;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
@@ -2,7 +2,8 @@ import { existsSync } from 'node:fs';
|
|
|
2
2
|
import { fileURLToPath } from 'node:url';
|
|
3
3
|
import { defineConfig } from 'vite';
|
|
4
4
|
import react from '@vitejs/plugin-react';
|
|
5
|
-
import
|
|
5
|
+
import tailwindcss from '@tailwindcss/vite';
|
|
6
|
+
import { tboxAppPlugin, tboxModuleSourcesPlugin } from '@tbox.cn/app-build';
|
|
6
7
|
|
|
7
8
|
const clientRoot = fileURLToPath(new URL('.', import.meta.url));
|
|
8
9
|
const repoPackages = fileURLToPath(new URL('../../../../packages', import.meta.url));
|
|
@@ -10,7 +11,12 @@ const repoModules = fileURLToPath(new URL('../../../../node_modules', import.met
|
|
|
10
11
|
|
|
11
12
|
export default defineConfig({
|
|
12
13
|
root: clientRoot,
|
|
13
|
-
plugins: [
|
|
14
|
+
plugins: [
|
|
15
|
+
tboxModuleSourcesPlugin({ appRoot: fileURLToPath(new URL('../..', import.meta.url)) }),
|
|
16
|
+
tboxAppPlugin({ root: fileURLToPath(new URL('../..', import.meta.url)) }),
|
|
17
|
+
tailwindcss(),
|
|
18
|
+
react(),
|
|
19
|
+
],
|
|
14
20
|
resolve: {
|
|
15
21
|
alias: {
|
|
16
22
|
react: fileURLToPath(new URL('./node_modules/react', import.meta.url)),
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/apps/server/src/dev.ts
CHANGED
|
@@ -10,10 +10,10 @@ const root = path.resolve(here, '../../..');
|
|
|
10
10
|
const clientDir = path.join(root, 'apps', 'client');
|
|
11
11
|
|
|
12
12
|
const generated = await generateApp({ root, watch: true });
|
|
13
|
-
const [{ registry }
|
|
13
|
+
const [{ registry }] = await Promise.all([
|
|
14
14
|
import('../../client/.tbox-gen/registry.server.ts'),
|
|
15
|
-
import('../../client/.tbox-gen/app-kind.ts'),
|
|
16
15
|
]);
|
|
16
|
+
const { appKind } = generated;
|
|
17
17
|
|
|
18
18
|
const httpServer = createServer();
|
|
19
19
|
const vite = await createViteServer({
|
|
Binary file
|
package/apps/server/src/index.ts
CHANGED
|
@@ -2,7 +2,7 @@ import path from 'node:path';
|
|
|
2
2
|
import { fileURLToPath } from 'node:url';
|
|
3
3
|
import { createApp, start, type AppManifest } from '@tbox.cn/app-sdk-server';
|
|
4
4
|
import manifest from '../../client/.tbox-gen/manifest.json';
|
|
5
|
-
import
|
|
5
|
+
import appMeta from '../../../.tbox/app.json';
|
|
6
6
|
import { registry } from '../../client/.tbox-gen/registry.server';
|
|
7
7
|
|
|
8
8
|
const here = path.dirname(fileURLToPath(import.meta.url));
|
|
@@ -10,7 +10,7 @@ const clientDir = path.resolve(here, '../../client/dist');
|
|
|
10
10
|
|
|
11
11
|
const app = await createApp({
|
|
12
12
|
manifest: manifest as AppManifest,
|
|
13
|
-
appKind,
|
|
13
|
+
appKind: appMeta.appKind as 'web',
|
|
14
14
|
registry,
|
|
15
15
|
mode: 'prod',
|
|
16
16
|
clientDir,
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tbox.cn/app-template-h5",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "tbox-app 1.0 Web 全栈模板:apps/client + apps/server 唯一应用代码根 + modules/ 源码根;appKind=web。",
|
|
6
6
|
"engines": {
|
|
7
|
-
"node": ">=24.0.0 <25.0.0"
|
|
7
|
+
"node": ">=24.0.0 <25.0.0",
|
|
8
|
+
"pnpm": ">=11 <12"
|
|
8
9
|
},
|
|
9
10
|
"license": "MIT",
|
|
10
11
|
"publishConfig": {
|
|
@@ -39,9 +40,9 @@
|
|
|
39
40
|
"express": "4.22.2"
|
|
40
41
|
},
|
|
41
42
|
"devDependencies": {
|
|
42
|
-
"@tbox.cn/app-build": "1.0.0-alpha.
|
|
43
|
-
"@tbox.cn/app-sdk-client": "1.0.0-alpha.
|
|
44
|
-
"@tbox.cn/app-sdk-server": "1.0.0-alpha.
|
|
43
|
+
"@tbox.cn/app-build": "1.0.0-alpha.11",
|
|
44
|
+
"@tbox.cn/app-sdk-client": "1.0.0-alpha.11",
|
|
45
|
+
"@tbox.cn/app-sdk-server": "1.0.0-alpha.11",
|
|
45
46
|
"@types/node": "24.13.3",
|
|
46
47
|
"@vitejs/plugin-react": "4.7.0",
|
|
47
48
|
"eslint": "9.39.5",
|
|
@@ -50,18 +51,25 @@
|
|
|
50
51
|
"typescript-eslint": "8.67.0",
|
|
51
52
|
"vite": "6.4.3"
|
|
52
53
|
},
|
|
54
|
+
"tbox": {
|
|
55
|
+
"compat": {
|
|
56
|
+
"baseline": {
|
|
57
|
+
"safari": 16.4,
|
|
58
|
+
"chrome": 105
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
53
62
|
"scripts": {
|
|
54
63
|
"dev": "pnpm --dir apps/server dev",
|
|
55
|
-
"build": "node scripts/generate.mjs && vite build --config apps/client/vite.config.ts && pnpm --dir apps/server build",
|
|
64
|
+
"build": "node scripts/generate.mjs && vite build --config apps/client/vite.config.ts && pnpm --dir apps/server build && node scripts/check-css-target.mjs",
|
|
56
65
|
"start": "node apps/server/dist/index.js",
|
|
57
66
|
"generate": "node scripts/generate.mjs",
|
|
58
67
|
"typecheck": "node scripts/generate.mjs && tsc -p packages/shared/tsconfig.json --noEmit && pnpm -r --filter \"./apps/*\" typecheck",
|
|
59
68
|
"test": "pnpm -r --filter \"./apps/*\" test",
|
|
60
69
|
"lint": "eslint apps packages scripts",
|
|
61
70
|
"check": "node scripts/check.mjs",
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"verify": "pnpm verify:fast && pnpm build"
|
|
71
|
+
"verify:fast": "pnpm typecheck && pnpm test && pnpm check",
|
|
72
|
+
"verify": "pnpm verify:fast && pnpm build",
|
|
73
|
+
"check:css": "node scripts/check-css-target.mjs"
|
|
66
74
|
}
|
|
67
75
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|