diff --git a/AGENTS.md b/AGENTS.md index 2613164..50b91ac 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -7,6 +7,10 @@ - 提交信息遵循现有风格:`type(scope): 简述`,正文(可选)说明动机与关键改动。常见 type:`feat` / `fix` / `docs` / `refactor` / `chore` / `perf`。 - 只在用户明确要求时才 `git push`。提交到本地即可,不主动推送。 +## JavaScript 库 + +在 libs 目录下都是 JavaScript 库,他们的包管理器都是 pnpm。 + ## Development Commands ```bash @@ -88,10 +92,10 @@ APP_BASE_URL= # e.g. https://your-domain.example — trusted origi Dioxus 0.7 fullstack project with **two independent gates** — the most common source of compilation errors. -| Gate | Applies to | Used for | -|------|-----------|----------| -| `#[cfg(feature = "server")]` | Server binary only | DB, env loading, background tasks, server function bodies, highlight, WebP, caching, sysinfo | -| `#[cfg(target_arch = "wasm32")]` | WASM frontend only | localStorage, DOM APIs, web_sys calls, theme detection | +| Gate | Applies to | Used for | +| -------------------------------- | ------------------ | -------------------------------------------------------------------------------------------- | +| `#[cfg(feature = "server")]` | Server binary only | DB, env loading, background tasks, server function bodies, highlight, WebP, caching, sysinfo | +| `#[cfg(target_arch = "wasm32")]` | WASM frontend only | localStorage, DOM APIs, web_sys calls, theme detection | **Critical**: Both default features (`web` + `server`) are enabled in `Cargo.toml`. The `dx` CLI handles feature selection during builds. @@ -150,12 +154,12 @@ src/codemirror_bridge.rs — wasm-bindgen bindings for CodeMirror editor (mirror Four Vite-built IIFE libraries under `libs/`, each with `pnpm-lock.yaml`. Built artifacts go to `public//` — **do not edit `public//` files; they are build artifacts**. Each `build` script is `tsc --noEmit && vite build` (type-check before bundle). Output is IIFE because Dioxus `[web.resource] script` injects bare `