Developer Workflow
Environment Prerequisites
All engineering workstations must adhere to the following baseline dependencies to interact with the repository:
- Node.js: Version 18.x is strictly required to match the production build environment and pipeline configurations.
- Package Manager: standard
npmis utilized for dependency resolution.
Warning: Do not use `yarn` or `pnpm`. The repository relies exclusively on `package-lock.json` for deterministic dependency resolution and SBOM accuracy.
Execution Commands
The local development lifecycle is controlled via standard npm scripts defined in package.json:
- Install Dependencies:
npm ci(Enforces strictpackage-lock.jsonadherence). - Development Server:
npm run dev(Starts the Astro development server onlocalhost:4321with Hot Module Replacement). - Production Build:
npm run build(Compiles the static site into thedist/directory).
Wrangler Edge Simulation
To validate Cloudflare Pages routing and compatibility locally, the built output must be served using the Wrangler CLI.
Simulation Steps
- Execute the production build:
npm run build - Run the Wrangler Pages simulator pointing to the output directory:
npx wrangler pages dev dist
Note: This simulation strictly evaluates the output against the `nodejs_compat` compatibility flags and routing rules defined in `wrangler.jsonc`.