moyf_easy-copy/CONTRIBUTING-zh.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

941 B
Raw Blame History

贡献指南

English | 中文文档

开发环境配置

npm install

构建

npm run build          # 类型检查 + 生产构建
npm run dev            # 监视模式(文件改动时自动重新构建)
npm run build:local    # 构建并复制到 Obsidian 库(需要 .env 中提供 VAULT_PATH

如需使用 build:local,请在项目根目录创建 .env 文件:

VAULT_PATH=/path/to/your/obsidian/vault

测试

测试基于 vitest,覆盖 src/linkBuilder.ts 中的纯函数。

npm test               # 运行一次全部测试
npm run test:watch     # 监视模式(文件改动时重新运行)

测试文件与源文件并列存放,使用 .test.ts 后缀(例如 src/linkBuilder.test.ts)。

Lint

npm run lint           # 检查 lint 错误
npm run lint:fix       # 自动修复 lint 错误