|
12 | 12 | - `packages/endpoint`: base Endpoint types; `packages/rest`: REST modeling (`resource()`, `RestEndpoint`).
|
13 | 13 | - `packages/core`: framework-agnostic normalized store, actions, Controller, Managers.
|
14 | 14 | - `packages/react`: React bindings (hooks like `useSuspense`, `useLive`, `useQuery`, `DataProvider`).
|
15 |
| - - `packages/normalizr`: schema/Entity/normalization; used by rest/core/react. |
| 15 | + - `packages/vue`: Vue 3 composables (`useSuspense`, `useQuery`, `useLive`, `provideDataClient`). |
| 16 | + - `packages/normalizr`: schema/Entity/normalization; used by rest/core/react/vue. |
16 | 17 |
|
17 | 18 | ### Developer workflows
|
18 | 19 | - Build all packages: `yarn build` (runs `tsc --build` + each workspace build). Clean with `yarn build:clean`.
|
|
34 | 35 | - TypeScript 5.9 project references are used; ambient `.d.ts` files are copied during build (`build:copy:ambient`).
|
35 | 36 |
|
36 | 37 | ### Where to look first
|
37 |
| -- High-level usage: root `README.md` and `packages/*/README.md` (react, rest, core) show canonical patterns. |
| 38 | +- High-level usage: root `README.md` and `packages/*/README.md` (react, rest, core, vue) show canonical patterns. |
38 | 39 | - REST patterns: `docs/rest/*`; Core/Controller/Managers: `docs/core/api/*`.
|
39 | 40 | - Example apps: `examples/todo-app`, `examples/github-app`, `examples/nextjs` demonstrate resources, hooks, mutations, and Managers.
|
| 41 | +- Vue patterns: `packages/vue/src/consumers/` for composables, `packages/vue/src/__tests__/` for Vue-specific test patterns. |
40 | 42 |
|
41 | 43 | ### Testing patterns
|
42 | 44 | - Prefer `renderDataHook()` from `@data-client/test` with `initialFixtures`/`resolverFixtures` for hook tests.
|
43 | 45 | - Use `nock` for low-level HTTP tests of endpoints. Keep tests under `packages/*/src/**/__tests__`.
|
| 46 | +- Vue tests use `@vue/test-utils` with `mount()` and Vue's `Suspense` component for async rendering. |
| 47 | +- Test file naming: `.node.test.ts[x]` for Node-only, `.native.test.ts[x]` for React Native, `.web.ts` for browser tests. |
44 | 48 |
|
45 | 49 | If anything here is unclear or missing (e.g., adding a new package, expanding CI/build), point it out and I’ll refine these instructions.
|
0 commit comments