diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..b62a275 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,113 @@ +# Contributing to Cozy Games + +Thanks for your interest in contributing! This guide covers what you need to +develop, test, and submit changes. + +> Working as an AI coding agent? See [AGENTS.md](AGENTS.md) for machine-oriented +> guidance. This document is for human contributors. + +## Prerequisites + +- **Node.js** — the version pinned in [`.nvmrc`](.nvmrc) (`lts/*`). With + [nvm](https://github.com/nvm-sh/nvm): `nvm use`. +- **pnpm** — this is a [pnpm](https://pnpm.io) workspace; **pnpm is required** + (npm/yarn will not work). The repo pins its pnpm version via the + `packageManager` field, so the simplest way to get the right one is Corepack: + `corepack enable`. +- **Java (JDK 11+, 21 recommended)** — only needed to run the local Firestore + emulator (used by the mnswpr app's leaderboard in development). `pnpm install` + tries to install a user-local Temurin JRE automatically; if that is skipped (CI + or an unsupported platform) install a JDK yourself. You can avoid Java entirely + with the `dev:no-db` script below. + +## Setup + +```bash +pnpm i # install all workspace dependencies +``` + +## Workspace commands (run from the repo root) + +```bash +pnpm test # run the whole test suite once (Vitest, jsdom) +pnpm test:watch # tests in watch mode +pnpm lint # eslint (JS + CSS) +pnpm lint:fix # eslint --fix +pnpm build:lib # build the publishable engine -> packages/mnswpr/dist +``` + +## Running a game locally + +Apps aren't run from the root — target one by name with pnpm's `-F` filter. Apps +are named `` (e.g. `mnswpr`), so every app runs the same way +(`pnpm -F run