Skip to content

Commit 787c6bd

Browse files
authored
chore: Replace demo app with Docusaurus docs site (#243)
* chore: remove CircleCI config; CI lives in GitHub Action * chore: simplify demo app * chore: add docs website * chore: add cloudflare preview workflow * chore: update PR template * chore: remove debug file * chore: update gitignore * chore: update preview url * chore: update dev & prod dependencies * chore: update vitest
1 parent c3fdf10 commit 787c6bd

72 files changed

Lines changed: 30825 additions & 15954 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.circleci/config.yml

Lines changed: 0 additions & 79 deletions
This file was deleted.

.claude/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ react-mosaic/
5858
│ ├── types.ts # Type definitions
5959
│ ├── contextTypes.ts # Context types
6060
│ └── util/ # Utility functions
61-
├── apps/demo-app/ # Demo application
61+
├── apps/website/ # Docusaurus docs + demo
6262
├── claude.md # LLM integration guide
6363
├── CONTRIBUTING_AI.md # AI contribution guidelines
6464
├── QUICKREF.md # Quick reference
@@ -189,6 +189,6 @@ For issues or questions:
189189

190190
## Version
191191

192-
This integration is designed for React Mosaic v0.20.0.
192+
This integration is designed for React Mosaic v7.
193193

194-
Last updated: 2025-12-04
194+
Last updated: 2026-04-15

.claude/settings.local.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

.claudeignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ pnpm-lock.yaml
6262
*.js.map
6363
*.css.map
6464

65-
# Demo app specific
66-
apps/demo-app/dist/
67-
apps/demo-app/.vite/
65+
# Website build output
66+
apps/website/build/
67+
apps/website/.docusaurus/
6868

6969
# Git files
7070
.git/

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
<!-- PR title must follow Conventional Commits: type: Description -->
2+
<!-- Allowed types: feat | fix | docs | style | refactor | perf | test | build | ci | chore | revert -->
3+
<!-- Example: feat: Add tab drag-and-drop support -->
4+
15
#### Fixes #0000
26

37
#### Changes proposed in this pull request:

.github/workflows/deployment.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,22 @@ jobs:
3535
- name: Npm install
3636
run: npm ci
3737

38-
- name: Build
39-
run: npm run build:app
38+
# The website imports the library from its built ESM bundle (see the
39+
# webpack alias in apps/website/docusaurus.config.ts), so the library
40+
# must be built before Docusaurus.
41+
- name: Build library
42+
run: npm run build:lib
43+
44+
- name: Build website
45+
run: npx nx run website:build
4046

4147
- name: Setup Pages
4248
uses: actions/configure-pages@v5
4349

4450
- name: Upload artifact
4551
uses: actions/upload-pages-artifact@v4
4652
with:
47-
# Upload apps dist folder
48-
path: './dist/apps/demo-app'
53+
path: './apps/website/build'
4954

5055
- name: Deploy to GitHub Pages
5156
id: deployment

.github/workflows/pr-validation.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ jobs:
3434

3535
- name: Build library
3636
run: npm run build:lib
37-
38-
- name: Build app
39-
run: npm run build:app
37+
38+
- name: Build website
39+
run: npm run build:site
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Preview Deploy
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
jobs:
8+
deploy-preview:
9+
name: Deploy Preview
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
pull-requests: write
14+
deployments: write
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v6
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v6
21+
with:
22+
node-version-file: '.node-version'
23+
cache: 'npm'
24+
25+
- name: Install dependencies
26+
run: npm ci
27+
28+
- name: Build library
29+
run: npm run build:lib
30+
31+
- name: Build website
32+
run: npx nx run website:build
33+
env:
34+
SITE_BASE_URL: /
35+
36+
- name: Deploy to Cloudflare Pages
37+
id: deploy
38+
uses: cloudflare/wrangler-action@v3
39+
with:
40+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
41+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
42+
command: pages deploy apps/website/build --project-name=react-mosaic --branch=pr-${{ github.event.pull_request.number }}
43+
44+
- name: Update PR comment
45+
uses: marocchino/sticky-pull-request-comment@v2
46+
with:
47+
header: preview-deploy
48+
message: |
49+
## Preview Deployment
50+
51+
| | |
52+
|---|---|
53+
| **Status** | Deployed |
54+
| **URL** | ${{ steps.deploy.outputs.deployment-url }} |
55+
| **Commit** | ${{ github.sha }} |

.gitignore

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,13 @@ vite.config.*.timestamp*
1818
vitest.config.*.timestamp*
1919
.parcel-cache
2020
.tsup
21-
/dist
21+
/dist
22+
23+
# Staged at Docusaurus config load — see apps/website/docusaurus.config.ts.
24+
# Blueprint CSS is copied here so it can be served as plain static files and
25+
# attached via the `stylesheets` config, instead of being bundled into the
26+
# site-wide stylesheet (which would leak Blueprint's unscoped body rules).
27+
apps/website/static/css/
28+
.claude/settings.local.json
29+
30+
.claude/worktrees

.npmignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
.editorconfig
33
.gitignore
44
.npmignore
5-
.circleci/
65
tsconfig*.json
76
demo/
87
docs/

0 commit comments

Comments
 (0)