2.3 KB · updated 2026-07-06 · md

v0.13.1.zh.md

docs/i18n/release-notes/v0.13.1.zh.md

Tesserae v0.13.1 — 管理编译源(本地与全局)

<!-- translations:start -->

English · 한국어 · 中文 · 日本語 · Русский · Español · Français · Deutsch

<!-- translations:end -->

发布于 2026-06-30 · PyPI · GitHub release · pip install --upgrade tesserae==0.13.1

一个小型的增量发布:从命令行管理项目的编译范围,而不必手动编辑 config.json

tesserae sources — 添加 / 列出 / 移除

tesserae compile(不带参数)会编译项目 sources 列表中的各个目录。现在你可以从命令行管理这个列表了——而且每个源既可以是本地的(位于项目内部),也可以是全局的(磁盘上的任何位置):

tesserae sources add docs                 # local  — inside the project (stored project-relative)
tesserae sources add /data/shared-notes   # global — an absolute path outside the project
tesserae sources add ../sibling-project   # global — a relative path that escapes the root
tesserae sources list                     # tags each source local/global, flags missing ones
tesserae sources remove docs
  • 位于项目内部的路径会以相对于项目的形式存储(这样 config.json 就能保持可移植);位于外部的任何路径都会以绝对路径形式存储。两者都在编译时解析,因此全局源的编译方式与本地源完全相同。
  • 添加操作会按解析后的位置去重——同一目录的绝对路径形式与 ../ 相对路径形式绝不会被重复计入。
  • list 会将每个条目标记为 local / global,并标出那些在磁盘上已不存在的条目。

此前,sources 数组只能在 init 时设定(而重新运行 init 会重建配置,而不是追加)。这是一种用于扩展项目范围的增量、非破坏性的方式。

升级

可直接覆盖 v0.13.0,无需额外改动。