chore: 重构 Turbo 构建配置并强化 Bun 专用说明

将应用特定的构建输出配置下沉至各自 turbo.json,根级 build 任务添加拓扑依赖;AGENTS.md 统一添加 Bun 专用运行时警告;桌面端启用 Linux CEF 渲染器。
This commit is contained in:
2026-02-07 16:14:55 +08:00
parent 44ca7a0f5e
commit adb14cff77
8 changed files with 31 additions and 7 deletions

View File

@@ -2,6 +2,8 @@
Electrobun desktop shell - loads the server app in a native window.
> **⚠️ This project uses Bun — NOT Node.js / npm. All commands use `bun`. Never use `npm`, `npx`, or `node`.**
## Architecture
- **Type**: Electrobun desktop application
@@ -75,5 +77,6 @@ Electrobun.events.on('will-quit', () => {
- Handle server startup gracefully
**DON'T:**
- Use `npm`, `npx`, `node`, `yarn`, `pnpm` — always use `bun` / `bunx`
- Hardcode dependency versions (use catalog)
- Block main thread during server wait

View File

@@ -10,5 +10,8 @@ export default {
bun: {
entrypoint: 'src/bun/index.ts',
},
linux: {
bundleCEF: true,
},
},
} satisfies ElectrobunConfig

View File

@@ -38,6 +38,7 @@ async function main() {
width: 1200,
height: 800,
},
renderer: 'cef',
})
Electrobun.events.on('will-quit', () => console.log('Quitting...'))

9
apps/desktop/turbo.json Normal file
View File

@@ -0,0 +1,9 @@
{
"$schema": "../../node_modules/turbo/schema.json",
"extends": ["//"],
"tasks": {
"build": {
"outputs": ["build/**", "artifacts/**"]
}
}
}