Scripts & Development

Every command in package.json, and what it is for.

Development

Command

What it does

pnpm dev

Vite dev server with HMR, at localhost:5173

pnpm dev:tauri

Tauri dev shell — native window with HMR against the Vite dev server

pnpm test:unit

Vitest in watch mode

pnpm test:e2e

Playwright end-to-end suite

Production builds

Command

What it does

pnpm build

Browser production build (static output)

pnpm build:tauri

Tauri production binary and installers for the host OS

pnpm preview

Serve the browser production build locally

Quality gates

Command

What it does

pnpm lint

prettier --check . then eslint . — must be 0 errors

pnpm format

Prettier write

pnpm check

svelte-kit sync + svelte-check — must be 0 errors, 0 warnings

pnpm check:watch

svelte-check in watch mode

pnpm test

Vitest single-run

pnpm coverage

Spec cross-reference gate; exits 1 on drift

pnpm coverage:refresh

Refetch the cached OpenAPI spec before checking

Before shipping a change

pnpm lint && pnpm check && pnpm test && pnpm coverage

All four green. Then rebuild and reinstall the desktop app if the change touched anything the user sees.

pkill -f haproxy_ui
TAURI_BUILD=1 pnpm exec tauri build
cp -R "src-tauri/target/release/bundle/macos/HAProxy UI.app" /Applications/
codesign --force --deep --sign - "/Applications/HAProxy UI.app"
open "/Applications/HAProxy UI.app"

Local Dataplane stack

docker compose up -d # haproxy:3.1 + dataplaneapi:3.1
curl -s http://localhost:5555/v3/services/haproxy/configuration/version -u admin:admin
 
docker compose down -v && docker compose up -d # reset the persisted config

Ports: 80 HAProxy, 5555 Dataplane API, 8404 stats. Seeded with HTTP Basic admin:admin. Volumes persist configuration edits across restarts, so use down -v when you need a clean baseline.

Known gotchas

  • pnpm install:dev has a cwd bug: its internal cargo clean silently no-ops. Use TAURI_BUILD=1 pnpm exec tauri build directly when you need a clean Rust rebuild.

  • /usr/libexec/plutil does not exist on all macOS versions; the icon-name step of install:dev fails harmlessly. /usr/libexec/PlistBuddy is available.


Was this article helpful?