docs: Document the tttk check command

Add check to the CLI guide, README, QWEN, and project structure: options, exit codes, diagnostic codes, and the checks not yet implemented. Mark compile as an unimplemented stub and fix stale element syntax in examples.
This commit is contained in:
2026-09-12 16:42:37 +08:00
parent 9def4d17aa
commit 9df6b9970a
4 changed files with 117 additions and 37 deletions
+10 -7
View File
@@ -1,12 +1,15 @@
# TTTK — Tabletop Toolkit
A TTRPG content preview and compilation tool based on `solid.js` and `rsbuild`. Write markdown, preview in browser.
A TTRPG content preview and validation tool based on `solid.js` and `rsbuild`. Write markdown, preview in browser, validate before you ship.
## 快速开始
```bash
# 无需安装,直接使用
npx tttk serve ./content
# 校验内容(存在错误时退出码为 1)
npx tttk check ./content
```
## 文档导航
@@ -22,7 +25,7 @@ npx tttk serve ./content
## 功能概览
- **CLI 工具**: `tttk serve` 预览模式 和 `tttk compile` 编译模式
- **CLI 工具**: `tttk serve` 预览模式、`tttk check` 校验模式(`tttk compile` 尚未实现)
- **Markdown 解析**: 支持指令语法、YAML 标签、mermaid 图表
- **TTRPG 组件**: 骰子、表格、卡牌、标记、命令追踪器等
@@ -30,11 +33,11 @@ npx tttk serve ./content
| 组件 | 语法 | 说明 |
|------|------|------|
| 🎲 骰子 | `:dice[2d6+d8]` | 掷骰并记录结果 |
| 📊 表格 | `:table[./data.csv]` | 标签页式表格 |
| 🃏 卡牌 | `:md-deck[./cards.csv]` | 卡牌布局 |
| 📍 标记 | `:md-pin[A]{x=40 y=40}` | 图片标记 |
| 📋 追踪器 | `:md-commander` | 命令历史和状态追踪 |
| 🎲 骰子 | `:md-dice[2d6+d8]` | 掷骰并记录结果 |
| 📊 表格 | `:md-table[./data.csv]` | 标签页式表格 |
| 🃏 卡牌 | `:md-deck[./cards.csv]` | 卡牌布局(推荐 `yaml role=tag` 写法) |
| 📍 标记 | `:md-pins[./map.png]{pins="A:25,50"}` | 图片标记 |
| 📋 追踪器 | `:md-commander[./commands.csv]` | 命令历史和状态追踪 |
## 技术栈