moyf_easy-copy/CONTRIBUTING.md
Andre Light 7c6aa950af chore: translate user-authored comments to Simplified Chinese
The maintainer reviews and writes comments in Chinese. To minimize
review friction and maximize merge likelihood, translate all
user-authored English comments across src/ into Simplified Chinese,
matching the upstream comment style. Test files included; describe/it
strings stay English (functional test names). Pre-existing English
comments authored by upstream contributors are left untouched.

Adds CONTRIBUTING-zh.md as a sibling translation of CONTRIBUTING.md
(matching the README.md / README-zh.md cross-linked convention).

Also corrects one Chinese comment in type.ts that became stale after
extending paste-time path resolution to all three Link format options.

No behavior change. 184 tests pass; typecheck and lint clean (the
pre-existing unrelated lint error in detectBlockId remains as before).

Designed, carefully reviewed, and edited by @lightmotive in collaboration with Claude Code.
2026-04-28 22:27:48 -06:00

924 B

Contributing

English | 中文文档

Development Setup

npm install

Building

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 and cover the pure link-building functions in src/linkBuilder.ts.

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

npm run lint           # Check for lint errors
npm run lint:fix       # Auto-fix lint errors