Skip to content

Commit 9b40b80

Browse files
Sander Toonenclaude
andcommitted
Move docs/ and samples/ out of packages/expreszo to the repo root
The documentation and the Monaco-based playground are repo-level concerns, not part of any published npm package. Both are now at the workspace root next to mkdocs.yml. * git mv packages/expreszo/docs -> docs/ * git mv packages/expreszo/samples -> samples/ * git mv packages/expreszo/mkdocs.yml -> mkdocs.yml Wiring: * samples/language-service-sample/serve-sample.cjs — special-cases `/dist/...` URLs to resolve them inside packages/expreszo/dist (the bundle still lives there). Other URLs continue to resolve against the new repo-root server root, so /docs/logo.png picks up the moved logo automatically. * root package.json gains `playground`, `docs:build`, `docs:serve` scripts that drive the new layout. The matching `playground` script in packages/expreszo/package.json is removed since it no longer fits at the package level. * packages/expreszo/vitest.config.ts drops the now-stale `samples/**` coverage exclude. * deploy-playground.yml runs `mkdocs build` from the repo root (mkdocs.yml is here now) and copies samples / dist / site from the root and from packages/expreszo as appropriate. * CLAUDE.md adds docs/, samples/, and the new yarn root scripts to the repository-layout section. Verified locally: mkdocs build --strict clean (writes to ./site), yarn workspaces run lint/type-check/test all green (2186 + 100 + 12 = 2298 tests pass). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent a32ea3e commit 9b40b80

29 files changed

Lines changed: 44 additions & 15 deletions

.github/workflows/deploy-playground.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,19 @@ jobs:
4545
run: pip install mkdocs-material==9.7.1
4646

4747
- name: Build documentation
48-
working-directory: packages/expreszo
48+
# mkdocs.yml lives at the repo root now; mkdocs reads docs/ from
49+
# there and writes the rendered site to ./site.
4950
run: mkdocs build
5051

5152
- name: Prepare playground files
5253
run: |
5354
mkdir -p _site/dist
54-
cp packages/expreszo/samples/language-service-sample/index.html _site/
55-
cp packages/expreszo/samples/language-service-sample/app.js _site/
56-
cp packages/expreszo/samples/language-service-sample/examples.js _site/
57-
cp packages/expreszo/samples/language-service-sample/styles.css _site/
55+
cp samples/language-service-sample/index.html _site/
56+
cp samples/language-service-sample/app.js _site/
57+
cp samples/language-service-sample/examples.js _site/
58+
cp samples/language-service-sample/styles.css _site/
5859
cp packages/expreszo/dist/bundle.js _site/dist/
59-
cp -r packages/expreszo/site _site/docs
60+
cp -r site _site/docs
6061
6162
- name: Setup Pages
6263
uses: actions/configure-pages@v5

CLAUDE.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,15 @@ This is a **yarn workspace monorepo** with three published packages:
1212
│ ├── expreszo/ # @pro-fa/expreszo — core expression evaluator
1313
│ ├── expreszo-datetime/ # @pro-fa/expreszo-datetime — optional Luxon plugin
1414
│ └── expreszo-mcp-server/ # @pro-fa/expreszo-mcp-server — MCP server CLI
15+
├── docs/ # mkdocs source — published to GitHub Pages by deploy-playground.yml
16+
├── samples/ # Monaco-based language-service playground (also deployed to Pages)
17+
├── mkdocs.yml # mkdocs site config (reads docs/, writes site/)
1518
├── eslint.config.js # shared eslint config
1619
├── tsconfig.base.json # shared TS compiler options (each package extends this)
1720
└── package.json # private workspace root
1821
```
1922

20-
The core never depends on Luxon or `@modelcontextprotocol/sdk` those live only in their respective companion packages.
23+
`docs/` and `samples/` are intentionally outside `packages/` — they are repo-level concerns, not part of any published npm package. The core never depends on Luxon or `@modelcontextprotocol/sdk` either; those live only in their respective companion packages.
2124

2225
## Commands
2326

@@ -41,6 +44,14 @@ yarn coverage # 80% threshold required
4144
yarn bench # parser benchmarks
4245
```
4346

47+
Docs and the playground are wired up at the workspace root:
48+
49+
```bash
50+
yarn playground # build expreszo UMD + serve the Monaco playground at :8080
51+
yarn docs:serve # mkdocs dev server with live reload
52+
yarn docs:build # produce ./site for the deploy-playground.yml workflow
53+
```
54+
4455
## Core architecture (`@pro-fa/expreszo`)
4556

4657
Safe, extensible expression evaluator — a configurable alternative to `eval()`. Uses a **Pratt parser** and an **immutable AST**:
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)