Skip to content

Commit 71a73ca

Browse files
committed
docs(validation): update README to reflect package purpose and usage instructions
- Change package name to @nbw/validation and clarify its role as the source of shared Zod schemas and TypeScript types. - Add detailed layout and script sections for building, developing, testing, linting, and cleaning the package. - Include instructions for consumers on how to import and use the package after building.
1 parent 9225d87 commit 71a73ca

1 file changed

Lines changed: 20 additions & 10 deletions

File tree

packages/validation/README.md

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
1-
# database
1+
# @nbw/validation
22

3-
To install dependencies:
3+
Shared **Zod** schemas and inferred TypeScript types used across the monorepo (NestJS API, frontend, `@nbw/database`, etc.). This package is the single source of truth for request/response shapes, env validation, and related DTOs.
44

5-
```bash
6-
bun install
7-
```
5+
## Layout
86

9-
To run:
7+
- `src/**/*.dto.ts` — Zod schemas and exports (`z.infer` types where needed)
8+
- `src/common/` — shared helpers (e.g. `jsonStringField`) and pagination types
9+
- `dist/` — compiled ESM (`tsc`); consume via the package `exports` entry
1010

11-
```bash
12-
bun run index.ts
13-
```
11+
## Scripts
1412

15-
This project was created using `bun init` in bun v1.2.12. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime.
13+
From this directory (or via the workspace root with a filter):
14+
15+
| Command | Description |
16+
| --------------- | --------------------------------------------------------------------------------------------- |
17+
| `bun run build` | Clean `dist`, emit JS (`tsconfig.build.json`), then declaration files (`tsconfig.types.json`) |
18+
| `bun run dev` | Watch mode for JS emit |
19+
| `bun run test` | Run `*.spec.ts` under `src/` (Bun test runner) |
20+
| `bun run lint` | ESLint on `src/**/*.ts` |
21+
| `bun run clean` | Remove `dist` |
22+
23+
## Consumers
24+
25+
Import from `@nbw/validation` after a successful build. Apps that bundle for the browser rely on **ESM** output; run `bun run build` in this package when schemas change so `dist/` stays in sync.

0 commit comments

Comments
 (0)