Files
slp-modular-cms/aidlc-docs/features/andreaslop-site-hosting/construction/build-and-test/build-instructions.md
T
2026-11-07 01:27:11 +01:00

1.5 KiB

Build Instructions

Prerequisites

  • Build tools: .NET SDK 10 (10.0.x), Node 20+ with pnpm (CI uses Node 20, pnpm 9; local pnpm 12 works, lockfile format unchanged).
  • Dependencies: NuGet and npm registries reachable. New frontend packages: @fontsource/jost@5.3.0, @fontsource/marcellus@5.3.0 (only bundled when VITE_THEME=asf).
  • Environment variables (admin build only, all optional): VITE_THEME (asf), VITE_DEFAULT_LANGUAGE (nl|en), VITE_APP_TITLE, VITE_APP_ENV, VITE_SENTRY_DSN.

Build steps

  1. Backend, all projects: dotnet build SlpModularCms.sln (from the repo root). Expected: 0 errors; warnings NU1903/NU1902/NU1510 about packages are known (see summary).
  2. Admin, default look: cd frontend && pnpm install --frozen-lockfile && pnpm build.
  3. Admin, ASF look: VITE_THEME=asf VITE_DEFAULT_LANGUAGE=nl VITE_APP_TITLE="Andrea Slop Fotografie" pnpm build. Expect dist/favicon-theme.png, four *.woff2 files and index.html linking /admin/favicon-theme.png. An unknown VITE_THEME must fail the build.
  4. Publish as CI does: copy frontend/dist/. to src/SlpModularCms.Api.AndreaSlopFotografie/wwwroot/admin/, then dotnet publish -c Release -r linux-arm64 --self-contained false in that project.

Troubleshooting

  • Unknown VITE_THEME "x": the name must be a folder under frontend/themes/ containing theme.css (available: asf).
  • Lockfile mismatch in CI: run pnpm install locally with the same major lockfile format and commit pnpm-lock.yaml.