Skip to content

Commit 103ada5

Browse files
committed
chore: set up monorepo foundation
Move the docs site into apps/docs as a Yarn workspace and keep root commands delegating to the docs workspace. Integrate the latest master content, assets, and landing-page test updates into the workspace layout.
1 parent d8765f7 commit 103ada5

857 files changed

Lines changed: 352 additions & 267 deletions

File tree

Some content is hidden

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

.github/workflows/deploy-fork-preview.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ jobs:
7878
with:
7979
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
8080
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
81+
workingDirectory: apps/docs
8182
command: pages deploy out --project-name=rescript-lang-org
8283
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
8384
wranglerVersion: 4.61.1

.github/workflows/deploy.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ jobs:
6161
with:
6262
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
6363
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
64+
workingDirectory: apps/docs
6465
command: pages deploy out --project-name=rescript-lang-org --branch=${{ env.SAFE_BRANCH }}
6566
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
6667
wranglerVersion: 4.63.0
@@ -101,5 +102,6 @@ jobs:
101102
uses: cypress-io/github-action@v7
102103
with:
103104
install: false
105+
working-directory: apps/docs
104106
browser: chrome
105107
config: baseUrl=${{ needs.deploy.outputs.deployment-url }}

.gitignore

Lines changed: 39 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,55 +3,63 @@
33
*.swo
44
.worktrees/
55

6-
# Generated via update-index script
7-
public/blog/feed.xml
6+
# Generated via docs update-index script
7+
apps/docs/public/blog/feed.xml
88

99
node_modules/
1010
.next/
1111
out/
12+
apps/docs/out/
1213
index_data/*.json
14+
apps/docs/index_data/*.json
1315

14-
# Generated via test examples script
16+
# Generated via docs test examples script
1517
temp
1618
temp-js-output
1719
temp-jsx-preserve
20+
apps/docs/temp
21+
apps/docs/temp-js-output
22+
apps/docs/temp-jsx-preserve
1823

1924
.bsb.lock
2025
.merlin
2126
lib/
27+
apps/docs/lib/
2228

2329
.vercel
2430

25-
src/**/*.mjs
26-
src/**/*.jsx
27-
scripts/gendocs.mjs
28-
scripts/generate_*.mjs
29-
scripts/gendocs.jsx
30-
scripts/generate_*.jsx
31+
apps/docs/src/**/*.mjs
32+
apps/docs/src/**/*.jsx
33+
apps/docs/scripts/gendocs.mjs
34+
apps/docs/scripts/generate_*.mjs
35+
apps/docs/scripts/gendocs.jsx
36+
apps/docs/scripts/generate_*.jsx
3137

3238
# Generated via generate-llms script
33-
public/llms/manual/**/llm*.txt
34-
public/llms/react/**/llm*.txt
35-
pages/docs/**/**/llms.mdx
36-
37-
public/playground-bundles/
38-
!public/_redirects
39+
apps/docs/public/llms/manual/**/llm*.txt
40+
apps/docs/public/llms/react/**/llm*.txt
41+
apps/docs/markdown-pages/docs/**/**/llms.mdx
3942

43+
apps/docs/public/playground-bundles/
44+
!apps/docs/public/_redirects
4045

4146
dist
4247
build
48+
apps/docs/dist
49+
apps/docs/build
4350
.react-router
44-
.worktrees/
51+
apps/docs/.react-router
4552
mdx-manifest.json
46-
47-
app/**/*.mjs
48-
app/**/*.jsx
49-
functions/**/*.mjs
50-
functions/**/*.jsx
51-
__tests__/**/*.mjs
52-
__tests__/**/*.jsx
53-
e2e/**/*.mjs
54-
e2e/**/*.jsx
53+
apps/docs/mdx-manifest.json
54+
55+
apps/docs/app/**/*.mjs
56+
apps/docs/app/**/*.jsx
57+
apps/docs/functions/**/*.mjs
58+
apps/docs/functions/**/*.jsx
59+
apps/docs/__tests__/**/*.mjs
60+
apps/docs/__tests__/**/*.jsx
61+
apps/docs/e2e/**/*.mjs
62+
apps/docs/e2e/**/*.jsx
5563
!_shims.mjs
5664
!_shims.jsx
5765

@@ -65,16 +73,20 @@ e2e/**/*.jsx
6573

6674
# wrangler
6775
.wrangler
76+
apps/docs/.wrangler
6877

69-
# Scripts generated from rolldown to convert them from .jsx files to .mjs files
78+
# Scripts generated from tsdown to convert them from .jsx files to .mjs files
7079
_scripts
80+
apps/docs/_scripts
7181

7282
# Local env files
7383
.env.local
84+
apps/docs/.env.local
7485

7586
# Local git worktrees
7687
.worktrees
7788

7889
# Vitest screenshots
79-
!__tests__/__screenshots__/**/*
90+
!apps/docs/__tests__/__screenshots__/**/*
8091
.vitest-attachments
92+
apps/docs/.vitest-attachments

.oxfmtrc.json

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@
44
"sortPackageJson": false,
55
"ignorePatterns": [
66
"!_shims.mjs",
7-
"!public/_redirects",
7+
"!apps/docs/public/_redirects",
88
".DS_Store",
99
".worktrees/",
1010
".next/",
1111
".react-router",
1212
"*.swo",
1313
"*.swp",
14-
"app/**/*.mjs",
14+
"apps/docs/app/**/*.mjs",
1515
"build",
16-
"data/api/**/*.json",
16+
"apps/docs/data/api/**/*.json",
1717
"dist",
18-
"index_data/*.json",
18+
"apps/docs/index_data/*.json",
1919
"node_modules/",
20-
"out/",
21-
"public/playground-bundles/",
22-
"public/blog/feed.xml",
20+
"apps/docs/out/",
21+
"apps/docs/public/playground-bundles/",
22+
"apps/docs/public/blog/feed.xml",
2323
"_tempFile.cmi",
2424
"_tempFile.cmj",
2525
"_tempFile.cmt",
@@ -28,15 +28,16 @@
2828
".bsb.lock",
2929
".merlin",
3030
"lib/",
31+
"apps/docs/lib/",
3132
".vercel",
32-
"src/**/*.mjs",
33-
"scripts/gendocs.mjs",
34-
"scripts/generate_*.mjs",
35-
"public/llms/manual/**/llm*.txt",
36-
"public/llms/react/**/llm*.txt",
37-
"pages/docs/**/**/llms.mdx",
38-
"markdown-pages/docs/manual/installation.mdx",
33+
"apps/docs/src/**/*.mjs",
34+
"apps/docs/scripts/gendocs.mjs",
35+
"apps/docs/scripts/generate_*.mjs",
36+
"apps/docs/public/llms/manual/**/llm*.txt",
37+
"apps/docs/public/llms/react/**/llm*.txt",
38+
"apps/docs/markdown-pages/docs/**/**/llms.mdx",
39+
"apps/docs/markdown-pages/docs/manual/installation.mdx",
3940
".yarn/releases/yarn-4.12.0.cjs",
40-
"data/api/*"
41+
"apps/docs/data/api/*"
4142
]
4243
}

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ SHELL = /bin/bash
22

33
node_modules/.bin/rescript:
44
yarn install
5-
yarn update-index
65

7-
build: node_modules/.bin/rescript
8-
node_modules/.bin/rescript
9-
yarn update-index
6+
build: node_modules/.bin/rescript
7+
yarn build:res
8+
yarn build:scripts
9+
yarn build:update-index
1010

1111
dev: build
1212
yarn dev
@@ -15,7 +15,7 @@ test: build
1515
yarn test
1616

1717
clean:
18-
rm -r node_modules lib
18+
rm -r node_modules apps/docs/lib apps/docs/build apps/docs/out
1919

2020
.DEFAULT_GOAL := build
2121

File renamed without changes.

0 commit comments

Comments
 (0)