# @dreadwood-types/types

Public wire protocol and client-safe constants for Dreadwoods.

## Publish (once)

Org on npm: `@dreadwood-types`. Package must exist before Render can use `npm ci` without cloning this repo.

```bash
npm login
npm publish
```

Verify: `npm view @dreadwood-types/types version` should print `0.1.0`.

## Install (published)

After publish, consumers on Render or CI install from the registry:

```bash
npm install @dreadwood-types/types@^0.1.0
```

## Local monorepo

Backend, frontend, and website depend on the sibling repo via `file:../dreadwoods-types`.
From the workspace root:

```powershell
# After npm install in at least one consumer (or if npm is broken on your machine):
.\scripts\setup-local-types.ps1
```

Or manually:

```bash
cd dreadwoods-types
npm install   # or use tsc from a sibling node_modules
npm run build
cd ../dreadwoods-backend && npm install
```

Publishes `dist/` with TypeScript declarations. Contains message types, tile enums, and display constants only - no server simulation logic.
