ProseHelpers
interfaceinterface ProseHelpersHelpers injected into prose Eta templates as top-level variables.
PROPERTIES
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| file | (relativePath: string) => FileAccessor | Return a chainable FileAccessor for a file, marking it consumed. |
| files | ExampleFile[] | All example files (read-only). |
| helpers | { codeBlock: (contents: string, language?: string, attributes?: Record<string, string>) => string; createFileAccessor: (file: ExampleFile, title?: string) => FileAccessor; filesByExt: (files: ExampleFile[], ext: string) => ExampleFile[]; hunkDescription: (metadata: Record<string, unknown>, hunkId: string) => string | undefined; isProseFile: (file: ExampleFile) => boolean; langFromPath: (filePath: string) => string; region: (files: ExampleFile[], regionId: string) => { content: string; file: ExampleFile } | undefined; slugify: (text: string) => string } | Standard template helpers (langFromPath, slugify, etc.). |
| region | (regionId: string) => string | Render a region/hunk as a fenced code block and mark its file consumed. |