fix(scaffolding): rename create-ssp to create-frontend, fix 2 bugs it surfaced

Renamed scripts/create-ssp.mjs -> create-frontend.mjs (+ its WP-45 doc, npm
script, and every prose/command reference) since "ssp" reads as an acronym
where "create-frontend" says what it does.

Also fixes two real bugs found while running it for real during WP-61:
scripts/ci-local.sh was missing from RENAME_CONTENT_FILES (any --name'd
clone that keeps a backend would break `npm run ci`, still hardcoding
BigRegister.slnx), and plopfile.mjs's `gen:context` insertion into
.dependency-cruiser.js anchored on the `showcase: null,` line, which
create-ssp/create-frontend has already stripped by the time gen:context
runs in the same invocation — silently leaving a freshly scaffolded
context with no CONTEXT_ALLOWED fence entry at all. Re-anchored on the
`const CONTEXT_ALLOWED = {` line instead, which never moves.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
eho
2026-07-31 23:26:28 +02:00
co-authored by Claude Sonnet 5
parent ba24784586
commit 920ce138cb
7 changed files with 21 additions and 17 deletions
@@ -9,8 +9,8 @@
// from nothing — those steps print an explicit checklist instead of pretending to solve them.
//
// Usage:
// node scripts/create-ssp.mjs --name Kvk --context inschrijving
// node scripts/create-ssp.mjs --name Kvk --context inschrijving --keep registratie --dry-run
// node scripts/create-frontend.mjs --name Kvk --context inschrijving
// node scripts/create-frontend.mjs --name Kvk --context inschrijving --keep registratie --dry-run
//
// --name <PascalName> replaces BigRegister.* everywhere (required)
// --context <name> lowercase Dutch ubiquitous term, passed to `plop context` (required)
@@ -43,7 +43,7 @@ function parseArgs(argv) {
function usageAndExit(message) {
if (message) console.error(message + '\n');
console.error(
'Usage: node scripts/create-ssp.mjs --name <PascalName> --context <lowercase-term> ' +
'Usage: node scripts/create-frontend.mjs --name <PascalName> --context <lowercase-term> ' +
'[--keep <context>] [--dry-run] [--skip-backend]',
);
process.exit(1);
@@ -351,6 +351,7 @@ const RENAME_CONTENT_FILES = [
'playwright.config.ts',
'README.md',
'backend/README.md',
'scripts/ci-local.sh',
];
const SKIP_DIRS = new Set(['bin', 'obj', 'node_modules', '.git']);
@@ -465,7 +466,7 @@ function repointDashboard(contextName, registratieWasStripped, args) {
const pageClass = `${pascalCase(contextName)}Page`;
const next = content.replace(
/loadComponent: \(\) => import\('@registratie\/ui\/dashboard\.page'\)\.then\(\(m\) => m\.DashboardPage\),/,
`// TODO(create-ssp): stopgap landing page — point this at a real overview once you have one.\n` +
`// TODO(create-frontend): stopgap landing page — point this at a real overview once you have one.\n` +
` loadComponent: () =>\n` +
` import('@${contextName}/ui/${contextName}.page').then((m) => m.${pageClass}),`,
);