thornhill-os-v4/.cursor/rules/stack-and-tooling.mdc
2026-07-23 18:37:51 +02:00

62 lines
1.8 KiB
Text
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
description: Project stack, how to run, build, and manage dependencies
alwaysApply: true
---
# Stack
- **Desktop runtime**: Deno Desktop (`deno desktop`) — app shell / packaging
- **Package manager**: Bun (`bun.lock`) — install and run npm scripts
- **UI**: Vue 3 (`<script setup>` Composition API)
- **Bundler**: Vite 8 + `@vitejs/plugin-vue`
- **CSS reset**: `destyle.css` (linked from `index.html`)
Do not introduce npm, yarn, pnpm, React, or a second bundler unless explicitly requested.
# Dependencies
```bash
# Install / sync from package.json + bun.lock
bun install
# Add / remove packages (updates bun.lock)
bun add <pkg>
bun add -d <pkg>
bun remove <pkg>
```
- Prefer Bun for dependency changes; do not use `npm install` / `yarn` / `pnpm`.
- Keep `bun.lock` committed; do not add `package-lock.json` or `yarn.lock`.
- Runtime deps go in `dependencies`; Vite/Vue plugin/types in `devDependencies`.
# Run
```bash
bun install # first time / after lockfile changes
bun run start # deno desktop --hmr . (preferred desktop HMR)
# or
bun run dev # alias → bun start
```
`deno.json` also defines `deno task dev` / `deno task build` (Vite only). Prefer `bun run start` for day-to-day desktop development.
# Build (native packages)
```bash
bun run build # all platforms via scripts/build-desktop.sh
bun run build-linux
bun run build-macos
bun run build-windows
```
Outputs land under `out/` (gitignored). Output basenames must not contain dots — Denos webview launcher strips after the last `.` (see comment in `scripts/build-desktop.sh`).
# Config touchpoints
| Concern | File |
|---|---|
| npm deps / scripts | `package.json` |
| Deno desktop app metadata & outputs | `deno.json` → `desktop` |
| Vite | `vite.config.js` |
| Entry HTML | `index.html` → `/src/main.js` |
| Packaging | `scripts/build-desktop.sh` |