Starter: refuse single-language and non-pl-default sites explicitly (later); docs and tests
ipal-kit create stops before writing anything and points to the manual ipal-setup path; project-starter.md, AGENT.md, ipal-setup, ipal-site and the CHANGELOG say the same. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
0170419473
commit
0dffb85ec1
@@ -102,8 +102,12 @@ export function validateAnswers(input: unknown): string[] {
|
||||
need(codes.length > 0 && codes.every((c) => typeof c === 'string' && LOCALE.test(c)), 'languages.locales: [{ code: "pl", label: "Polski" }, …]')
|
||||
need(Array.isArray(langs?.locales) && langs.locales.every((l) => isText(l?.label)), 'languages.locales: every locale needs a label')
|
||||
need(new Set(codes).size === codes.length, 'languages.locales: a code is listed twice')
|
||||
// The base seed writes Polish and English text and Polish default-locale slugs (reference/src/seed/base.ts).
|
||||
need(langs?.default === 'pl' && codes.includes('en'), 'languages: this version needs default "pl" and "en" among the locales (the base seed is Polish + English); other sites → the manual ipal-setup path')
|
||||
// Not in this version (owner's decision: later): the base seed writes Polish + English text with Polish
|
||||
// default-locale slugs, and the reference site has a [locale] segment (reference/src/seed/base.ts).
|
||||
const manual = 'is not supported by `ipal-kit create` yet — set the site up by hand with the ipal-setup skill (stages 1–11)'
|
||||
need(codes.length !== 1, `languages: a single-language site ${manual}`)
|
||||
need(codes.length === 1 || langs?.default === 'pl', `languages: a default language other than "pl" (here "${String(langs?.default)}") ${manual}`)
|
||||
need(codes.length <= 1 || codes.includes('en'), `languages: a site without "en" ${manual}`)
|
||||
|
||||
const st = a.styling
|
||||
need(isText(st?.primary), 'styling.primary: the brand colour (any CSS colour, oklch recommended)')
|
||||
|
||||
Reference in New Issue
Block a user