# How To Release

This guide describes the release checklist for `wikied`.

## Pre-Release Checklist

* Project docs describe the shipped behavior.
* Documentation screenshots are current.
* Client, server, shared, and e2e tests pass.
* The React app is built and included in `dist/client`.
* The CLI binary works from a packed tarball.
* The package contains only intended runtime files.
* Known gaps are documented.

## Update Documentation Screenshots

```bash
npm run build
node scripts/capture-doc-screenshots.mjs
```

Review the images in:

```text
docs/project/images/
```

## Verify

```bash
npm run lint
npm test
npm run test:e2e
```

## Clean Build And Pack

```powershell
powershell -ExecutionPolicy Bypass -File scripts/package-local.ps1
```

The script creates a fresh local tarball such as:

```text
wikied-0.3.0.tgz
```

## Test The Packed Package

From a temporary fixture project:

```powershell
mkdir C:\tmp\wikied-release-smoke
cd C:\tmp\wikied-release-smoke
Set-Content -Path README.md -Value "# Release Smoke"
npx --yes --package "C:\Projects\learning\site-editor\wikied-0.3.0.tgz" wikied
```

Verify:

* The CLI starts.
* The localhost URL loads.
* A Markdown file opens.
* Editing and saving works.
* The app serves the prebuilt React bundle, not a Vite dev server.

## Publish

```bash
npm publish
```

Publish only after the packed-package smoke test passes.
