Skip to content

Commit de747b7

Browse files
authored
Better structure monorepo and publish JS files for react-openapi and react-math (#2392)
1 parent 8e8b73f commit de747b7

File tree

342 files changed

+337
-142
lines changed

Some content is hidden

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

342 files changed

+337
-142
lines changed

.changeset/five-maps-tickle.md

Lines changed: 5 additions & 0 deletions

.changeset/proud-shrimps-lie.md

Lines changed: 7 additions & 0 deletions

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
5959
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
6060
projectName: ${{ vars.CLOUDFLARE_PROJECT_NAME }}
61-
directory: ./.vercel/output/static
61+
directory: ./packages/gitbook/.vercel/output/static
6262
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
6363
workingDirectory: ./
6464
- name: Outputs
@@ -108,7 +108,7 @@ jobs:
108108
env:
109109
PUPPETEER_SKIP_DOWNLOAD: 1
110110
- name: Run pagespeed tests
111-
run: bun ./tests/pagespeed-testing.ts $DEPLOYMENT_URL
111+
run: bun ./packages/gitbook/tests/pagespeed-testing.ts $DEPLOYMENT_URL
112112
env:
113113
DEPLOYMENT_URL: ${{needs.deploy.outputs.deployment_url}}
114114
PAGESPEED_API_KEY: ${{ secrets.PAGESPEED_API_KEY }}

.gitignore

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,6 @@ node_modules
55
/.pnp
66
.pnp.js
77

8-
# testing
9-
/coverage
10-
11-
# next.js
12-
/.next/
13-
/out/
14-
15-
# production
16-
/build
17-
188
# misc
199
.DS_Store
2010
*.pem
@@ -24,25 +14,9 @@ npm-debug.log*
2414
yarn-debug.log*
2515
yarn-error.log*
2616

27-
# local env files
28-
.env*.local
17+
# Turbo
18+
.turbo
2919

30-
# vercel
20+
# Vercel
3121
.vercel
3222

33-
# typescript
34-
*.tsbuildinfo
35-
next-env.d.ts
36-
37-
# visual tests
38-
screenshots/
39-
40-
# Sentry Config File
41-
.sentryclirc
42-
/test-results/
43-
/playwright-report/
44-
/blob-report/
45-
/playwright/.cache/
46-
47-
# Generated public files
48-
/public/~gitbook/static/

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
.next
2+
.vercel
23

34
# Generated
45
packages/emoji-codepoints/index.ts
6+
packages/gitbook/public/~gitbook/static/

bun.lockb

11.5 KB
Binary file not shown.

package.json

Lines changed: 10 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -2,95 +2,26 @@
22
"name": "gitbook",
33
"version": "0.1.0",
44
"private": true,
5+
"packageManager": "[email protected]",
56
"scripts": {
6-
"dev": "next dev",
7-
"build": "next build",
8-
"build:cloudflare": "next-on-pages",
9-
"start": "next start",
10-
"lint": "next lint",
7+
"dev": "turbo run dev",
8+
"build": "turbo run build",
9+
"build:cloudflare": "turbo run build:cloudflare",
10+
"lint": "turbo run lint",
11+
"typecheck": "turbo run typecheck",
1112
"format": "prettier ./ --ignore-unknown --write",
1213
"format:check": "prettier ./ --ignore-unknown --list-different",
13-
"typecheck": "tsc --noEmit",
14-
"unit": "bun test {src,packages}",
15-
"e2e": "playwright test",
14+
"unit": "turbo run unit",
15+
"e2e": "turbo run e2e",
1616
"changeset": "changeset",
17-
"release": "changeset publish",
18-
"postinstall": "rm -rf ./public/~gitbook/static/[email protected] && mkdir -p ./public/~gitbook/static/ && cp -R node_modules/mathjax/es5 ./public/~gitbook/static/[email protected]"
17+
"release": "turbo run build && changeset publish"
1918
},
2019
"workspaces": [
2120
"packages/*"
2221
],
23-
"dependencies": {
24-
"@geist-ui/icons": "^1.0.2",
25-
"@gitbook/api": "^0.56.0",
26-
"@radix-ui/react-checkbox": "^1.0.4",
27-
"@radix-ui/react-popover": "^1.0.7",
28-
"@sentry/nextjs": "^7.94.1",
29-
"@sindresorhus/fnv1a": "^3.1.0",
30-
"@tailwindcss/container-queries": "^0.1.1",
31-
"@tailwindcss/typography": "^0.5.10",
32-
"@upstash/redis": "^1.27.1",
33-
"ajv": "^8.12.0",
34-
"assert-never": "^1.2.1",
35-
"bun-types": "^1.0.7",
36-
"classnames": "^2.5.1",
37-
"content-security-policy-merger": "^1.0.0",
38-
"framer-motion": "^10.16.14",
39-
"js-cookie": "^3.0.5",
40-
"jsontoxml": "^1.0.1",
41-
"katex": "^0.16.9",
42-
"mathjax": "^3.2.2",
43-
"memoizee": "^0.4.15",
44-
"next": "^14.1.3",
45-
"next-themes": "^0.2.1",
46-
"nuqs": "^1.17.4",
47-
"object-hash": "^3.0.0",
48-
"openapi-types": "^12.1.3",
49-
"p-map": "^7.0.0",
50-
"parse-cache-control": "^1.0.1",
51-
"react": "^18",
52-
"react-dom": "^18",
53-
"react-hotkeys-hook": "^4.4.1",
54-
"recoil": "^0.7.7",
55-
"rehype-sanitize": "^6.0.0",
56-
"rehype-stringify": "^10.0.0",
57-
"remark-gfm": "^4.0.0",
58-
"remark-parse": "^11.0.0",
59-
"remark-rehype": "^11.1.0",
60-
"rison": "^0.1.1",
61-
"server-only": "^0.0.1",
62-
"shiki": "^1.2.0",
63-
"tailwind-merge": "^2.2.0",
64-
"tailwind-shades": "^1.1.2",
65-
"unified": "^11.0.4",
66-
"url-join": "^5.0.0"
67-
},
6822
"devDependencies": {
69-
"@argos-ci/playwright": "^2.0.0",
7023
"@changesets/cli": "^2.27.7",
71-
"@cloudflare/next-on-pages": "^1.11.3",
72-
"@cloudflare/workers-types": "^4.20231218.0",
73-
"@playwright/test": "^1.42.1",
74-
"@types/js-cookie": "^3.0.6",
75-
"@types/jsontoxml": "^1.0.5",
76-
"@types/jsonwebtoken": "^9.0.6",
77-
"@types/katex": "^0.16.5",
78-
"@types/node": "^20",
79-
"@types/object-hash": "^3.0.6",
80-
"@types/parse-cache-control": "^1.0.4",
81-
"@types/psi": "^4.1.6",
82-
"@types/react": "^18",
83-
"@types/react-dom": "^18",
84-
"@types/rison": "^0.0.9",
85-
"autoprefixer": "^10",
86-
"eslint": "^8",
87-
"eslint-config-next": "13.5.6",
88-
"eslint-plugin-import": "^2.29.0",
89-
"jsonwebtoken": "^9.0.2",
90-
"postcss": "^8",
9124
"prettier": "^3.0.3",
92-
"psi": "^4.1.0",
93-
"tailwindcss": "^3.4.0",
94-
"typescript": "^5"
25+
"turbo": "^2.0.9"
9526
}
9627
}
File renamed without changes.
File renamed without changes.

packages/gitbook/.gitignore

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# testing
4+
/coverage
5+
6+
# next.js
7+
/.next/
8+
/out/
9+
10+
# production
11+
/build
12+
13+
# local env files
14+
.env*.local
15+
16+
# vercel
17+
.vercel
18+
19+
# typescript
20+
*.tsbuildinfo
21+
next-env.d.ts
22+
23+
# visual tests
24+
screenshots/
25+
26+
# Sentry Config File
27+
.sentryclirc
28+
29+
/test-results/
30+
/playwright-report/
31+
/blob-report/
32+
/playwright/.cache/
33+
34+
# Generated public files
35+
/public/~gitbook/static/

0 commit comments

Comments
 (0)