-
Notifications
You must be signed in to change notification settings - Fork 0
Contributing and Releases
How to set up the StrataWP monorepo locally, make changes, and ship releases with Changesets.
StrataWP is a Turborepo + pnpm workspaces monorepo. Whether you're fixing a bug in a single package or adding a new one, the loop is the same: install once at the root, work inside the affected package, and run tests and lint before opening a pull request. This page walks through each step.
Note The canonical contributor guide lives at
CONTRIBUTING.md. This page expands on it with full commands and the release workflow. If the two ever disagree, the in-repo file wins.
Before you clone, make sure your machine has:
| Tool | Version | Notes |
|---|---|---|
| Node.js | 18+ | Root engines field requires node >=18.18. |
| pnpm | 8+ | Root engines requires pnpm >=8.0.0; the repo is pinned to pnpm@8.12.1 via packageManager. |
| PHP | 8.1+ | Needed for the PHP framework (Composer package stratawp/core) and the example themes. |
| Composer | v2 | Installs the PHP dependencies (stratawp/core) for the example themes. |
Tip Install pnpm with Corepack so the pinned version is used automatically:
corepack enable corepack prepare pnpm@8.12.1 --activate
-
Clone the repository and move into it:
git clone https://github.com/JonImmsWordpressDev/strataWP.git cd strataWP -
Install all workspace dependencies from the root. pnpm links the workspace packages together automatically:
pnpm install
Expected: pnpm resolves the lockfile and installs dependencies for every workspace package under
packages/*andexamples/*.Warning Always run
pnpm installfrom the repository root, not inside an individual package. Installing inside a sub-package breaks the workspace symlinks Turborepo relies on. -
Start the monorepo in development mode:
pnpm dev
This runs
turbo devacross packages that define adevtask (persistent, non-cached). Leave it running while you work.
All scripts run from the repository root. Turborepo fans them out to the relevant packages and caches results where it can.
| Command | What it does |
|---|---|
pnpm dev |
Start all package dev servers (turbo dev). |
pnpm build |
Production build of every package (turbo build). |
pnpm test |
Run unit tests across packages (turbo test). |
pnpm typecheck |
TypeScript validation across packages (turbo typecheck). |
pnpm lint |
Lint all TypeScript/JavaScript with ESLint (eslint .). |
pnpm lint:fix |
Lint and auto-fix where possible (eslint . --fix). |
pnpm lint:php |
Lint PHP via scripts/lint-php.mjs. |
pnpm format |
Format .ts, .tsx, .md, and .json files with Prettier. |
pnpm format:check |
Check formatting without writing changes. |
pnpm test:e2e |
Run the Playwright accessibility E2E suite inside examples/basic-theme (playwright.a11y.config.ts). |
pnpm test:perf |
Run Lighthouse CI (lhci autorun). |
pnpm clean |
Run turbo clean and remove node_modules. |
Tip To work on a single package, scope the command with a pnpm filter, for example:
pnpm --filter @stratawp/cli test
Follow these steps for each change. They mirror the Development Workflow section of CONTRIBUTING.md.
-
Create a branch off your work:
git checkout -b feature/your-feature-name
-
Make your changes.
-
Run the tests:
pnpm test -
Lint your code:
pnpm lint
-
Commit using Conventional Commits (see below).
-
Push your branch and open a pull request.
Commit messages use the Conventional Commits format so history stays parseable:
| Prefix | Use for |
|---|---|
feat: |
New features |
fix: |
Bug fixes |
docs: |
Documentation changes |
chore: |
Maintenance tasks |
refactor: |
Code refactoring |
test: |
Test additions or changes |
Examples:
git commit -m "feat(cli): add block generator command"
git commit -m "fix(vite-plugin): resolve HMR issue with PHP files"
git commit -m "docs: update README with new examples"-
TypeScript — formatted with Prettier (config included). Run
pnpm format. - PHP — follow the WordPress Coding Standards.
- Commit messages — Conventional Commits format.
Before requesting review, confirm:
- Documentation is updated if your change needs it.
- New features have tests.
- All tests pass (
pnpm test). -
CHANGELOG.mdis updated if applicable — for versioned package changes, add a changeset instead (see below). - A maintainer is requested for review.
Tip Use issues for bugs and feature requests, and discussions for open-ended questions or ideas.
StrataWP uses Changesets to version and publish its npm packages. The flow is: contributors add a changeset describing their change, then a maintainer versions and publishes.
When your change affects a published package, record it:
pnpm changesetThis launches an interactive prompt to pick the affected packages, choose a semver bump (patch / minor / major), and write a short summary. It writes a markdown file under .changeset/ — commit that file with your PR.
Note Not every PR needs a changeset. Docs-only edits, internal tooling, and test-only changes that don't affect any published package can skip it.
When it's time to cut a release, apply all pending changesets to bump versions and update changelogs:
pnpm version-packagesThis runs changeset version, which consumes the files in .changeset/, updates each package's version, and regenerates per-package changelog entries. Review and commit the result.
pnpm releaseThis runs turbo build && changeset publish — it builds every package first, then publishes the newly versioned packages to npm.
Warning
pnpm releasepublishes to the public npm registry. Only maintainers with publish rights should run it, and only afterpnpm version-packageshas been committed.
| Command | Underlying script | Who runs it |
|---|---|---|
pnpm changeset |
changeset |
Contributors |
pnpm version-packages |
changeset version |
Maintainers |
pnpm release |
turbo build && changeset publish |
Maintainers |
Publishing packages to npm is separate from shipping a distributable example theme. The Build and Release Theme workflow (.github/workflows/release-theme.yml) automatically packages the Basic theme into an installable zip whenever a GitHub Release is published.
When a release is published, the workflow:
- Checks out the code and sets up Node.js 20 and pnpm 9.
- Installs dependencies with
pnpm install --frozen-lockfile. - Builds all packages with
pnpm build. - Sets up PHP 8.1 with Composer v2, then runs
composer install --no-dev --optimize-autoloaderinexamples/basic-theme. - Stamps the release tag (with the leading
vstripped) into the theme'sstyle.cssVersion:header. - Stages the production files (
dist,vendor,templates,parts,patterns,inc,languages, root PHP files,style.css,theme.json,screenshot.png) and zips them intostrata-basic.zip. (Each copy is best-effort, so optional paths that don't exist — such aslanguages— are skipped without failing the build.) - Attaches
strata-basic.zipto the GitHub Release.
Note To trigger this workflow, publish a release from a tag such as
v2.0.0. The tag name drives the version written intostyle.css.
Warning The pinned tool versions differ between local development and this CI workflow — local development targets Node 18+ and pnpm 8.12.1, while the theme-release workflow runs on Node 20 and pnpm 9. Stick with the local versions in the prerequisites table for day-to-day work; the workflow is self-contained.
-
Changelog — every notable change is recorded in
CHANGELOG.md, organized by version. The current release is v2.0.0 ("Focus"), which sharpened the framework's scope by removing three packages from the monorepo. When in doubt about whether a change is user-facing, add a changeset (see above) and let the release process fold it into the changelog. -
Roadmap — planned direction and the rationale behind what is (and isn't) being built lives in
ROADMAP.md. It captures the v2.0 scope, the packages under review for v2.1 (@stratawp/explorerand@stratawp/headless), and the ranked investment list for upcoming work. Read it before proposing a large feature so your work aligns with where the project is heading.
Tip The roadmap is explicit about what StrataWP will not build (admin UIs, an embedded AI SDK, a component registry). Checking it first can save you from building something that's intentionally out of scope.
By contributing, you agree that your contributions are licensed under GPL-3.0-or-later — the same license as StrataWP itself, and as WordPress.
- Project Structure — how the monorepo is laid out.
- Architecture & Packages — what each package does.
- Testing & Quality — the test and lint tooling in depth.
-
CLI Reference — every
stratawpcommand. - Home
StrataWP v2.0.0 · GPL-3.0-or-later · Built by Jon Imms Repository · README
Start here
Building themes
Shipping
Extending & contributing
Help