Deploying documentation
The docs site lives in docs/ and is built with VitePress.
Local development
vp install
vp run docs:dev # http://localhost:5173/
vp run docs:build # static output → docs/.vitepress/dist
vp run docs:preview # preview production buildCloudflare Pages
The VitePress config uses base: "/" for a Cloudflare Pages project named mastra-effect at https://mastra-effect.pages.dev.
vp run docs:build
vp run docs:deploy # wrangler pages deploy docs/.vitepress/dist --project-name=mastra-effectRequires Wrangler and a Cloudflare account. Authenticate with wrangler login or set CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID.
| Setting | Value |
|---|---|
| Build command | vp run docs:build |
| Output directory | docs/.vitepress/dist |
| Node version | 22+ |
GitHub Actions: .github/workflows/docs-pages.yml deploys on pushes to main when CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID repository secrets are configured.
Other static hosts
If the site is served from a subpath (for example GitHub Pages project sites), set base in docs/.vitepress/config.ts to that path (for example "/mastra-effect/").
Library development
This monorepo uses Vite+ for formatting, linting, type-checking, tests, and library builds.
vp install
vp check # format + lint + type-check
vp run -r typecheck # include compile-time type tests
vp run -r test
vp run -r build # vp pack in each packagePackage builds use vp pack (tsdown) instead of bare tsc emit. VitePress remains the docs toolchain.
Publishing 0.0.1
Do not publish from this repo without an npm token. When ready:
vp install
vp check
vp run -r typecheck
vp test
vp run -r build
vp run docs:build
pnpm -r publish --access public --no-git-checks # after npm loginChecklist:
- [ ] Both packages at
0.0.1, notprivate - [ ]
peerDependenciesuse semver ranges (noworkspace:in packed manifests — CI verifies) - [ ] Tarballs contain
dist/andsrc/with.d.ts.mapfiles for IDE go-to-definition (CI verifies) - [ ] Docs site matches
main(vp run docs:build) - [ ]
CHANGELOG.mdentry for the release