chore: 重构 Turbo 构建配置并强化 Bun 专用说明
将应用特定的构建输出配置下沉至各自 turbo.json,根级 build 任务添加拓扑依赖;AGENTS.md 统一添加 Bun 专用运行时警告;桌面端启用 Linux CEF 渲染器。
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -10,5 +10,8 @@ export default {
|
||||
bun: {
|
||||
entrypoint: 'src/bun/index.ts',
|
||||
},
|
||||
linux: {
|
||||
bundleCEF: true,
|
||||
},
|
||||
},
|
||||
} satisfies ElectrobunConfig
|
||||
|
||||
@@ -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
9
apps/desktop/turbo.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"$schema": "../../node_modules/turbo/schema.json",
|
||||
"extends": ["//"],
|
||||
"tasks": {
|
||||
"build": {
|
||||
"outputs": ["build/**", "artifacts/**"]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user