boardgame-core/docs/development.md

33 lines
502 B
Markdown
Raw Normal View History

2026-04-04 13:20:34 +08:00
# 开发指南
## 安装
```bash
npm install boardgame-core
```
## 脚本
```bash
npm run build # 构建 ESM bundle + 类型声明到 dist/
npm run test # 以 watch 模式运行测试
npm run test:run # 运行测试一次
npm run typecheck # TypeScript 类型检查
```
### 运行单个测试文件
```bash
npx vitest run tests/samples/tic-tac-toe.test.ts
```
### 按名称运行单个测试
```bash
npx vitest run -t "should detect horizontal win for X"
```
## License
MIT