Skip to content

Commit 310d102

Browse files
saihajDimitri POSTOLOV
andauthored
chore: move to monorepo (#296)
* chore: use pnpm * install in docker * use overrides * restructure * acc builds? * type cast * remove top level .next.env.d.ts * fix build * remove extra space * ensure we are running post/pre scripts * update website integriy check script * feedback * Update website/package.json Co-authored-by: Dimitri POSTOLOV <[email protected]> * remove package manager * chore: add remark-frontmatter * chore: add remark-mdx-frontmatter * fix: deps * move eslint config to root * remove sitemap xml from public --------- Co-authored-by: Dimitri POSTOLOV <[email protected]>
1 parent c338320 commit 310d102

File tree

482 files changed

+680
-370
lines changed

Some content is hidden

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

482 files changed

+680
-370
lines changed

.github/workflows/website-integrity.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ jobs:
2929
run: pnpm build
3030

3131
- name: Compare
32-
run: git diff origin/${{ github.base_ref }}.. -- route-lockfile.txt
32+
run: git diff origin/${{ github.base_ref }}.. -- website/route-lockfile.txt
3333

3434
- name: Diff to file
3535
if: always()
3636
id: diff_result
3737
run: |
3838
echo "result<<EOF" >> $GITHUB_OUTPUT
39-
echo "$(git diff origin/${{ github.base_ref }}.. -- route-lockfile.txt)" >> $GITHUB_OUTPUT
39+
echo "$(git diff origin/${{ github.base_ref }}.. -- website/route-lockfile.txt)" >> $GITHUB_OUTPUT
4040
echo EOF >> $GITHUB_OUTPUT
4141
4242
- name: Publish a message

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# dependencies
2-
/node_modules
2+
node_modules/
33
/.pnp
44
.pnp.js
55
.yalc
@@ -39,4 +39,4 @@ yarn-error.log*
3939

4040
.idea/
4141

42-
public/sitemap*.xml
42+
*/public/sitemap*.xml

Dockerfile

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
11
FROM node:18-alpine as builder
22

3+
ENV PNPM_HOME="/usr/bin"
4+
35
RUN apk add --no-cache git
46
RUN npm install -g pnpm
57

68
WORKDIR /app
79

8-
# copy package and lock files first for better caching
9-
COPY ./package.json /app/package.json
10-
COPY ./pnpm-lock.yaml /app/pnpm-lock.yaml
10+
COPY . .
1111

1212
# install the packages
1313
RUN pnpm install --frozen-lockfile --ignore-scripts
1414

15-
# copy the rest
16-
COPY . .
17-
1815
RUN pnpm build
1916
RUN pnpm export
2017

package.json

Lines changed: 8 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
{
2-
"name": "@graphprotocol/docs",
3-
"version": "1.0.0",
4-
"packageManager": "[email protected]",
2+
"name": "the-graph-docs-monorepo",
53
"private": true,
4+
"packageManager": "[email protected]",
65
"scripts": {
76
"dev": "next dev",
8-
"build": "rm -rf .next && next build",
9-
"postbuild": "next-sitemap --config next-sitemap.config.cjs && node scripts/sitemap-ci.mjs",
10-
"start": "next start",
11-
"export": "rm -rf out && next export -o out/docs",
7+
"build": "pnpm -r build",
8+
"start": "pnpm --filter @graphprotocol/docs start",
9+
"export": "pnpm --filter @graphprotocol/docs export",
1210
"lint": "eslint . --ext .js,.jsx,.ts,.tsx,.mjs && pnpm prettier:check && pnpm typecheck",
1311
"lint:fix": "eslint . --fix --ext .js,.jsx,.ts,.tsx,.mjs && pnpm prettier && pnpm typecheck",
1412
"prettier": "prettier . --write",
@@ -21,55 +19,13 @@
2119
"pre-commit": "lint-staged --concurrent false",
2220
"pre-push": "pnpm build"
2321
},
24-
"dependencies": {
25-
"@docsearch/react": "^3.3.3",
26-
"@edgeandnode/components": "^27.0.0",
27-
"@emotion/react": "^11.10.6",
28-
"@mdx-js/loader": "^2.3.0",
29-
"@mdx-js/react": "^2.3.0",
30-
"@next/mdx": "^13.2.3",
31-
"@radix-ui/react-collapsible": "1.0.1",
32-
"@radix-ui/react-popover": "^1.0.4",
33-
"@radix-ui/react-visually-hidden": "^1.0.1",
34-
"@reach/auto-id": "^0.18.0",
35-
"lodash": "^4.17.21",
36-
"mixpanel-browser": "^2.45.0",
37-
"next": "^13.2.3",
38-
"next-seo": "^5.15.0",
39-
"next-sitemap": "^4.0.1",
40-
"prism-react-renderer": "^1.3.5",
41-
"react": "^18.2.0",
42-
"react-dom": "^18.2.0",
43-
"react-intersection-observer": "^9.4.3",
44-
"react-use": "^17.4.0",
45-
"remark-gfm": "^3.0.1",
46-
"theme-ui": "^0.15.5"
47-
},
4822
"devDependencies": {
49-
"@babel/core": "^7.21.0",
50-
"@edgeandnode/eslint-config": "^1.3.1",
51-
"@sindresorhus/slugify": "^2.2.0",
52-
"@svgr/webpack": "^6.5.1",
53-
"@types/color": "^3.0.3",
54-
"@types/lodash": "^4.14.191",
55-
"@types/mixpanel-browser": "^2.38.1",
56-
"@types/node": "^18.14.5",
57-
"@types/react": "^18.0.28",
58-
"@types/react-dom": "^18.0.11",
59-
"acorn": "^8.8.2",
60-
"acorn-jsx": "^5.3.2",
61-
"eslint": "^8.35.0",
62-
"fast-xml-parser": "^4.1.3",
23+
"@edgeandnode/eslint-config": "^1.3.0",
24+
"eslint": "^8.34.0",
6325
"husky": "^8.0.3",
6426
"lint-staged": "^13.1.2",
65-
"path": "^0.12.7",
6627
"prettier": "^2.8.4",
67-
"remark-frontmatter": "^4.0.1",
68-
"remark-mdx-frontmatter": "^2.1.1",
69-
"serialize-as-code": "^2.0.2",
70-
"typescript": "4.9.5",
71-
"unist-util-visit": "^4.1.2",
72-
"url": "^0.11.0"
28+
"typescript": "4.9.5"
7329
},
7430
"pnpm": {
7531
"overrides": {

0 commit comments

Comments
 (0)