Skip to content

Commit

Permalink
setup turbo for dev and build commands (graphprotocol#407)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimitri POSTOLOV authored Jun 14, 2023
1 parent 989664e commit 160941e
Show file tree
Hide file tree
Showing 9 changed files with 177 additions and 81 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/next-js-bundle-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:

- name: Build Next.js App
# change this if your site requires a custom build command
run: pnpm build
run: cd .. && pnpm build

# Here's the first place where next-bundle-analysis' own script is used
# This step pulls the raw bundle stats for the current bundle
Expand Down
21 changes: 8 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,29 +1,23 @@
# dependencies
node_modules/
/.pnp
.pnp.js
.yalc
yalc.lock

# testing
/coverage
coverage/

# next.js
.next
/out/
.next/
out/

# production
/build
build/

# misc
.DS_Store
*.pem
.vscode
.vscode/

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
*.log*

# local env files
.env.local
Expand All @@ -32,7 +26,7 @@ yarn-error.log*
.env.production.local

# vercel
.vercel
.vercel/

# typescript
*.tsbuildinfo
Expand All @@ -42,3 +36,4 @@ yarn-error.log*
*/public/sitemap*.xml
.eslintcache
dist/
.turbo/
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM node:18-alpine as builder
ENV PNPM_HOME="/usr/bin"

RUN apk add --no-cache git
RUN npm install -g [email protected].0
RUN npm install -g [email protected].2

WORKDIR /app

Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "the-graph-docs-monorepo",
"private": true,
"packageManager": "[email protected].0",
"packageManager": "[email protected].2",
"scripts": {
"build": "pnpm -r build",
"build": "turbo run build",
"check": "pnpm typecheck && pnpm lint && pnpm prettier:check",
"check:fix": "pnpm typecheck; pnpm lint:fix; exit 0",
"dev": "pnpm --filter @graphprotocol/docs dev",
"check:fix": "pnpm typecheck && pnpm lint:fix",
"dev": "turbo run dev --parallel",
"docker:build": "DOCKER_BUILDKIT=1 docker build . -t docs --no-cache",
"docker:clean": "docker builder prune",
"docker:up": "docker run --rm -it -p 3000:80 -v \"$(pwd)/nginx.conf:/etc/nginx/nginx.conf\" docs",
Expand All @@ -19,7 +19,7 @@
"prettier": "prettier . --loglevel warn --write",
"prettier:check": "prettier . --loglevel warn --check",
"start": "pnpm --filter @graphprotocol/docs start",
"typecheck": "pnpm --filter @graphprotocol/docs typecheck"
"typecheck": "turbo run typecheck"
},
"devDependencies": {
"@edgeandnode/eslint-config": "^1.3.5",
Expand All @@ -34,6 +34,7 @@
"remark-lint-heading-increment": "^3.1.2",
"remark-lint-no-heading-punctuation": "^3.1.2",
"remark-lint-restrict-elements": "workspace:*",
"turbo": "^1.10.3",
"typescript": "~5.0.4"
},
"lint-staged": {
Expand Down
5 changes: 3 additions & 2 deletions packages/nextra-theme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@
"dist"
],
"scripts": {
"//FIXME typecheck": "tsc --noEmit",
"build": "tsup",
"dev": "tsup --watch"
},
"peerDependencies": {
"@edgeandnode/gds": "^1.3.2",
"@emotion/react": "^11.10.6",
"next": "^13.3.1",
"next": "^13.4.5",
"next-seo": "^5.15.0",
"nextra": "^2.7.1",
"react-dom": "^18.2.0",
Expand All @@ -47,7 +48,7 @@
"@types/lodash": "^4.14.195",
"@types/react": "18.2.7",
"@types/react-dom": "^18.2.4",
"next": "^13.4.4",
"next": "^13.4.5",
"next-seo": "^6.0.0",
"nextra": "2.7.1",
"react": "18.2.0",
Expand Down
Loading

0 comments on commit 160941e

Please sign in to comment.