Build, deploy, and export
Run evidence-based source checks, build and deploy a static website, and export exact slide or Step states to PDF.
Check the source
Run these commands from the generated project root. The npm run scripts always use the Drever
version installed in that project.
npm run check
npm run check -- slides.mdx
npm run check -- --jsonPreflight reports defects Drever can prove from authored source:
- Missing or duplicate slide titles.
- Missing or explicitly empty image alternative text.
- Skipped heading levels inside a slide.
- Authored video without a caption track.
Diagnostics include a stable code, severity, stage, message, and exact source range when available. The command exits nonzero for errors; warnings stay visible without blocking delivery.
Preflight is not a visual oracle. Inspect rendered overflow, contrast, reading order, component semantics, and motion in the actual browser surfaces.
Check every rendered state
Add --rendered when a production candidate needs deterministic browser evidence:
npm run check -- --rendered
npm run check -- --rendered --jsonDrever builds an isolated inspection app and visits Step 0 plus every exact authored Step at the configured canvas. Stable diagnostics report clipped content, content outside the canvas, unexpected movement or resizing of persistent geometry, and suspicious density supported by multiple rendered signals.
Clipping and overflow are errors. Geometry and density are warnings because deliberate reflow and
information-rich slides can be valid. Missing Chromium and runtime failures are explicit errors.
Install the matching browser with npm exec -- drever browser install.
| Code | Severity | Evidence |
|---|---|---|
DREVER_RENDER_CONTENT_CLIPPED | Error | Visible content is cut by an owning surface. |
DREVER_RENDER_CANVAS_OVERFLOW | Error | Visible content extends beyond the configured canvas. |
DREVER_RENDER_GEOMETRY_UNSTABLE | Warning | Persistent content moves or resizes between Steps. |
DREVER_RENDER_DENSITY_HIGH | Warning | Multiple rendered density signals cross their limits. |
DREVER_RENDER_BROWSER_MISSING | Error | The matching Playwright Chromium is unavailable. |
DREVER_RENDER_RUNTIME_FAILED | Error | A route, application, or capture invariant did not run. |
JSON mode emits the current typed report V2. Its rendered receipt records the receipt and ruleset
versions, canvas, chromium engine, optional browser version, captured state count, status, and any
skip or failure reason. Source errors produce a skipped receipt instead of starting an unsafe
build. The schema also models a legacy source-only V1 report for stored artifacts; it does not
count as rendered evidence. This is stable machine evidence for CI and agents, not an aesthetic
score. Continue to inspect contrast, hierarchy, reading order, motion, and the presentation's
visual fit in the actual browser.
Build a static website
npm run buildThe default output is dist/. The build emits a standalone application plus static entries for
every valid audience and speaker position and /document. A small route bootstrap resolves the
mount point before assets activate, so the artifact works at a domain root or below a subdirectory.
Host the complete dist/ directory on any static platform.
Deploy the static site
Cloudflare Pages, Vercel, and GitHub Pages are illustrative hosting choices, not Drever partners or requirements. The same static artifact works on other hosts that can publish a directory.
| Setting | Value |
|---|---|
| Build command | npm run build |
| Output directory | dist |
| SPA fallback | None; do not add one |
| Node.js | Current Node.js, >=24.18.0 |
Do not rewrite every request to index.html. Drever emits static entries for its public routes and
resolves subdirectory mounts from the requested URL.
Cloudflare Pages
Follow the official Pages Git integration
guide. Connect the
repository, use main as the production branch, apply the shared build settings above, and set
NODE_VERSION to 24.18.0 or newer. Keep preview deployments enabled for non-production branches.
Deploy this repository with Cloudflare Pages Git integration. Use main for production, npm run
build for the build command, dist for the output directory, and NODE_VERSION=24.18.0 or newer.
Keep branch previews enabled. Do not add an SPA fallback.Vercel
Import the repository using Vercel's build
settings: choose Other for Framework Preset, set the build
command to npm run build, the output directory to dist, and the Node.js version to 24.x. Confirm
that the selected 24.x release satisfies the minimum in the shared table.
Import this repository into Vercel with Framework Preset Other. Use npm run build, publish dist,
and select a Node.js 24.x release that is at least 24.18. Do not add rewrites or an SPA fallback.GitHub Pages
In the repository's Pages settings, select GitHub Actions as the publishing source, then add
.github/workflows/pages.yml. This follows GitHub's official custom workflow
flow:
name: Deploy Pages
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 24.18.0
- run: npm ci
- run: npm run build
- uses: actions/configure-pages@v5
- uses: actions/upload-pages-artifact@v4
with:
path: dist
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4
Export PDF
npm run export
npm run export -- --output release/keynote.pdf
npm run export -- --slides 2-5,8
npm run export -- --stepsIf doctor reports that Chromium is missing, install the exact revision used by the local Drever
CLI, then retry:
npm exec -- drever browser installLinux environments that also need Playwright's operating-system packages can add --with-deps.
By default, export creates one page per slide at its final authored Step. --steps emits Step 0 and
every exact compiled stop. --slides selects one-based slide numbers and inclusive ranges, and
composes with --steps.
The export surface disables motion, awaits fonts and authored images, runs plugin export setup, rejects duplicate DOM IDs, and writes the file only after capture succeeds. Page order, state, and dimensions are deterministic; byte-for-byte PDF equality across Chromium and font environments is not part of the contract.
Official designs prefer PDF-embeddable local CJK faces during export without downloading a font. Custom designs should self-host an embeddable webfont when the export host does not provide the required Chinese, Japanese, or Korean glyphs. A system fallback that paints in Chromium can still be unavailable to Chromium's PDF writer.
Use the same evidence in CI
The human commands expose stable JSON forms for agents and automation:
npm exec -- drever doctor --json
npm exec -- drever context --json
npm run check -- --json
npm run check -- --rendered --json
npm run build -- --json
npm run export -- --jsonRun the fast source check on every change. Use rendered preflight at a production boundary or after layout and Step changes, then browser-test the presentation states that changed. Keep visual review focused on real layouts and transitions instead of adding cosmetic E2E cases for every style detail.
Troubleshooting and support
Start with the project-local diagnostic so the report reflects the version you installed:
npm exec -- drever doctor --jsonIt reports the resolved project, Node.js version, browser availability, and delivery prerequisites. If the problem remains, include that output and a minimal reproduction in a GitHub issue. Drever is under active development; keep the generated project files and its installed version together when reporting a problem.
Find exact syntax, options, defaults, and the guide that owns each workflow.