Milestone 0/1: shell, calendar/psalter/hours scaffold, Prime
Deploy / deploy (push) Failing after 1m8s
Deploy / deploy (push) Failing after 1m8s
Client-side-first PWA (Vite/TS, no backend) per the approved plan: day- navigable shell listing all 8 hours, Prime fully resolves via the calendar -> psalter -> ordo pipeline, the other 7 hours are registered but flagged not-implemented. Sanctoral/temporal calendar data uses a day -> id indirection layer (saints, easter-offsets, fixed-date-calendar) so reassigning a feast to a different day is a data edit, not a code change. Docker (Caddy-serving-static) + Gitea CI workflow scaffolded to match the eec/drip/bookshop operational pattern. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import type { Psalm } from './types';
|
||||
|
||||
// @rollup/plugin-yaml parses each .yml into a plain object at build time —
|
||||
// no YAML parser shipped to the client.
|
||||
const modules = import.meta.glob<{ default: Psalm }>('../data/psalms/*.yml', {
|
||||
eager: true,
|
||||
});
|
||||
|
||||
const psalms = new Map<number, Psalm>();
|
||||
for (const mod of Object.values(modules)) {
|
||||
psalms.set(mod.default.number, mod.default);
|
||||
}
|
||||
|
||||
export function getPsalm(number: number): Psalm {
|
||||
const psalm = psalms.get(number);
|
||||
if (!psalm) {
|
||||
throw new Error(`no data for psalm ${number}`);
|
||||
}
|
||||
return psalm;
|
||||
}
|
||||
|
||||
export type { Psalm, PsalmVerse, LanguageCode, TranslationStatus } from './types';
|
||||
Reference in New Issue
Block a user