Skip to content

Commit 7cea0e7

Browse files
authored
Merge pull request #225 from moinulmoin/replace-contentlayer
feat: ✨ replace contentlayer with velite
2 parents 0813925 + aa70b9f commit 7cea0e7

File tree

11 files changed

+1119
-1854
lines changed

11 files changed

+1119
-1854
lines changed

.gitignore

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ next-env.d.ts
3838
# custom workspace settings
3939
.vscode
4040
.idea
41-
# contentlayer
42-
.contentlayer
4341

4442
# worker
4543
sw.*
@@ -50,5 +48,4 @@ workbox-*.*
5048
!.env.project
5149
!.env.vault
5250

53-
docker-compose.yml
54-
migrations
51+
.velite

contentlayer.config.ts

Lines changed: 0 additions & 23 deletions
This file was deleted.

lefthook.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
pre-commit:
88
commands:
9+
typecheck:
10+
glob: "src/**/*.{ts,tsx}"
11+
run: npx tsc --noEmit
912
lint:
1013
glob: "src/**/*.{ts,tsx,js,jsx}"
1114
run: npx eslint {staged_files} --fix && git add {staged_files}

next.config.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
const { withContentlayer } = require("next-contentlayer");
21
const withPWA = require("@ducanh2912/next-pwa").default({
32
dest: "public",
43
disable: process.env.NODE_ENV !== "production",
@@ -16,6 +15,9 @@ const nextConfig = {
1615
];
1716
},
1817
trailingSlash: true,
18+
eslint: {
19+
ignoreDuringBuilds: true,
20+
}
1921
};
2022

21-
module.exports = withPWA(withContentlayer(nextConfig));
23+
module.exports = withPWA(nextConfig);

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"scripts": {
66
"dev": "prisma generate && next dev",
77
"dev:email": "email dev -p 9000",
8-
"build": "prisma generate && prisma db push && next build",
8+
"dev:content": "velite build --watch",
9+
"build:content": "velite build --clean",
10+
"build": "pnpm build:content && prisma generate && prisma db push && next build",
911
"start": "next start",
1012
"lint": "next lint --dir src",
1113
"format": "prettier --write 'src/**/*.{ts,tsx,js,jsx,css,json}'",
@@ -59,20 +61,19 @@
5961
"autoprefixer": "10.4.16",
6062
"class-variance-authority": "^0.7.0",
6163
"clsx": "^2.0.0",
62-
"contentlayer": "^0.3.4",
6364
"encoding": "^0.1.13",
6465
"eslint": "8.56.0",
6566
"eslint-config-next": "14.2.2",
66-
"eslint-config-prettier": "^9.1.0",
67+
"eslint-config-prettier": "^8.10.0",
6768
"lefthook": "^1.5.5",
68-
"next-contentlayer": "^0.3.4",
6969
"prettier": "3.2.5",
7070
"prettier-plugin-tailwindcss": "^0.5.9",
7171
"prisma": "^5.7.0",
7272
"sharp": "^0.33.1",
7373
"tailwind-merge": "^2.3.0",
7474
"tailwindcss": "3.4.1",
7575
"tailwindcss-animate": "^1.0.7",
76-
"typescript": "5.3.3"
76+
"typescript": "5.3.3",
77+
"velite": "0.1.0-rc.3"
7778
}
7879
}

0 commit comments

Comments
 (0)