Commands#
Every supported command, what it does, and when to run it. There is no project-specific CLI; these are npm scripts.
Development and build#
| Command | What it does | When |
|---|---|---|
npm run dev |
Starts the development server through the Cloudflare Vite plugin, with the worker pipeline active | Editing content |
npm run build |
Produces the production build | Before deploying, and as the first half of npm test |
npm run start |
Serves the production build locally | Checking the built artefact by hand |
All three write tool logs to .wrangler/ inside the project.
Checks#
| Command | What it does | When |
|---|---|---|
npm run lint |
Runs ESLint, ignoring dist and .next |
Before every commit |
npm test |
Runs npm run build, then the rendered-HTML test suite |
Before every deploy |
npm test is a superset of npm run build. Running the build separately first
is useful only when you want to inspect the output.
Database#
| Command | What it does | When |
|---|---|---|
npm run db:generate |
Generates a Drizzle migration from db/schema.ts into drizzle/ |
After adding or changing a table |
The schema is empty by default, so this command produces nothing until a table exists. See Configuration.
Verify#
npm run lint and npm test both exit zero on a clean checkout.
If it does not work#
A command that is not listed here is not supported. If a script exists in
package.json that this page does not describe, treat it as unsupported rather
than assuming it is safe to run against production.