[ui] LetterSlot: Add the page for A Letter from the Gardener, shown once the author writes it
docs/LETTER.md holds slots as comments only, so the player sees no change
until the author writes. The app bundles the letter at build time, a small
Markdown subset renders without {@html}, only https: and tel: become links,
and lint:copy now reads the letter. Review found turbo replaying a stale
build after the letter changed; docs/LETTER.md is now in its cache key.
This commit is contained in:
@@ -4,7 +4,8 @@
|
||||
* @rosea/content (copy-lint.ts, forbidden.ts) and are tested there.
|
||||
*
|
||||
* Not scanned: .agents/ and docs/, where the forbidden words may appear because
|
||||
* they are being discussed (§5.6 rule 4).
|
||||
* they are being discussed (§5.6 rule 4). The one exception is docs/LETTER.md:
|
||||
* it lives with the docs but a player reads it (letter-slot.md L6).
|
||||
*/
|
||||
import { existsSync, readFileSync, readdirSync, statSync } from 'node:fs';
|
||||
import { extname, join, relative } from 'node:path';
|
||||
@@ -21,8 +22,8 @@ const TARGETS: readonly { dir: string; ext: readonly string[] }[] = [
|
||||
{ dir: 'store', ext: ['.md', '.txt', '.json'] }
|
||||
];
|
||||
|
||||
/** Single files: the page shell and the config that builds the web manifest. */
|
||||
const FILES: readonly string[] = ['apps/rosea/index.html', 'apps/rosea/vite.config.ts'];
|
||||
/** Single files: the page shell, the config that builds the web manifest, and the Letter. */
|
||||
const FILES: readonly string[] = ['apps/rosea/index.html', 'apps/rosea/vite.config.ts', 'docs/LETTER.md'];
|
||||
|
||||
function walk(dir: string, ext: readonly string[]): string[] {
|
||||
if (!existsSync(dir)) return [];
|
||||
|
||||
Reference in New Issue
Block a user