From d6f6678b38611b973b25446c95a129b19dbd9dc3 Mon Sep 17 00:00:00 2001 From: Andre Light <7719153+lightmotive@users.noreply.github.com> Date: Mon, 13 Apr 2026 17:11:04 -0600 Subject: [PATCH] docs: add CONTRIBUTING.md with development and testing instructions --- CONTRIBUTING.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..a0fc0cd --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,39 @@ +# Contributing + +## Development Setup + +```bash +npm install +``` + +## Building + +```bash +npm run build # Type-check + production build +npm run dev # Watch mode (rebuilds on file changes) +npm run build:local # Build + copy to Obsidian vault (requires .env with VAULT_PATH) +``` + +For `build:local`, create a `.env` file in the project root: + +``` +VAULT_PATH=/path/to/your/obsidian/vault +``` + +## Testing + +Tests use [vitest](https://vitest.dev/) and cover the pure link-building functions in `src/linkBuilder.ts`. + +```bash +npm test # Run all tests once +npm run test:watch # Run tests in watch mode (re-runs on file changes) +``` + +Test files live alongside source files with a `.test.ts` suffix (e.g., `src/linkBuilder.test.ts`). + +## Linting + +```bash +npm run lint # Check for lint errors +npm run lint:fix # Auto-fix lint errors +```