Skip to content

Commit

Permalink
feat: add turbo
Browse files Browse the repository at this point in the history
  • Loading branch information
qinsong77 committed Sep 26, 2024
1 parent cb8fd68 commit 3af7177
Show file tree
Hide file tree
Showing 8 changed files with 182 additions and 78 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,5 @@ next-env.d.ts
/playwright-report/
/blob-report/
/playwright/.cache/

.turbo
2 changes: 1 addition & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pnpm test
pnpm run test
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
turbo test
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ node_modules
next-env.d.ts
next.config.ts
pnpm-lock.yaml
.github
.husky
.turbo

components/ui
*.tsbuildinfo
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ This is a [Next.js](https://nextjs.org/) 14 Boilerplate project base on [`create
- Docker
- Playwright: Write end-to-end tests like a pro or cypress
- Github actions/CI
- Turbo for task cache

## Demos

Expand Down
14 changes: 11 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,29 @@
"version": "0.1.0",
"private": true,
"type": "module",
"packageManager": "[email protected]",
"scripts": {
"preinstall": "npx only-allow pnpm",
"prepare": "husky",
"dev": "next dev | pino-pretty",
"dev:turbo": "next dev --turbo | pino-pretty",
"build": "next build",
"preview": "next build && cp -r dist/static dist/standalone/dist/static && cp -r public dist/standalone/public && node dist/standalone/server.js",
"build-analyze": "cross-env ANALYZE=true pnpm run build",
"check-types": "tsc --noEmit --pretty",
"lint": "next lint",
"lint-and-format-fix": "next lint --fix && pnpm run prettier:fix",
"format": "prettier . --check",
"format:fix": "prettier '**/*.{js,jsx,ts,tsx,json,md}' --write",
"preview": "next build && cp -r dist/static dist/standalone/dist/static && cp -r public dist/standalone/public && node dist/standalone/server.js",
"test": "vitest run",
"test:coverage": "vitest run --coverage",
"test:watch": "vitest",
"test:e2e": "playwright test"
"test:e2e": "playwright test",
"turbo:check": "turbo lint format type-check test",
"turbo:test": "turbo test",
"turbo:build": "turbo build",
"turbo:preview": "turbo preview",
"turbo:e2e": "turbo test:e2e"
},
"dependencies": {
"@radix-ui/react-accordion": "^1.2.0",
Expand Down Expand Up @@ -87,7 +94,8 @@
"prettier": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.6",
"tailwindcss": "^3.4.12",
"typescript": "5.6.2",
"turbo": "^2.1.2",
"typescript": "5.3.3",
"vitest": "^2.1.1"
},
"engines": {
Expand Down
Loading

0 comments on commit 3af7177

Please sign in to comment.