Skip to content

Commit

Permalink
run prettier when building apps
Browse files Browse the repository at this point in the history
  • Loading branch information
Atmosfearful committed Dec 17, 2021
1 parent d49b7e5 commit 7f45034
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 9 deletions.
7 changes: 7 additions & 0 deletions app/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# next.js
.next/

# production
node_modules/
out/
build/
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"dev": "next dev -p 3001",
"build": "next build",
"build": "prettier --check . && next build",
"start": "next start",
"export": "next export",
"lint": "next lint"
Expand Down
7 changes: 7 additions & 0 deletions lib/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# next.js
.next/

# production
node_modules/
out/
build/
4 changes: 2 additions & 2 deletions lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
},
"scripts": {
"dev": "tsc --watch",
"build": "tsc",
"lint": "eslint ."
"build": "npm run lint && tsc",
"lint": "prettier --check . && eslint ."
}
}
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
"node": ">=14.18.1"
},
"scripts": {
"build-lib": "npm run lint --workspace=lib && npm run build --workspace=lib",
"build-lib": "npm run build --workspace=lib",
"build-site": "npm run build-lib && npm run build --workspace=site",
"build-site-vercel": "cd ./lib && npm run lint && npm run build && cd ../site && npm run build",
"build-site-vercel": "cd ./lib && npm run build && cd ../site && npm run build",
"build-app": "npm run build-lib && npm run build --workspace=app",
"build-app-vercel": "cd ./lib && npm run lint && npm run build && cd ../app && npm run build",
"export-app": "cd ./lib && npm run lint && npm run build && cd ../app && npm run build && npm run export",
"build-app-vercel": "cd ./lib && npm run build && cd ../app && npm run build",
"export-app": "cd ./lib && npm run build && cd ../app && npm run build && npm run export",
"dev-lib": "npm run dev --workspace=lib",
"dev-site": "npm run build-lib && npm run dev --workspace=site",
"dev-app": "npm run build-lib && npm run dev --workspace=app"
Expand Down
7 changes: 7 additions & 0 deletions site/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# next.js
.next/

# production
node_modules/
out/
build/
1 change: 0 additions & 1 deletion site/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/// <reference types="next" />
/// <reference types="next/types/global" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
Expand Down
2 changes: 1 addition & 1 deletion site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"build": "prettier --check . && next build",
"start": "next start",
"lint": "next lint"
},
Expand Down

0 comments on commit 7f45034

Please sign in to comment.