Skip to content

Commit

Permalink
Merge pull request #225 from moinulmoin/replace-contentlayer
Browse files Browse the repository at this point in the history
feat: ✨ replace contentlayer with velite
  • Loading branch information
moinulmoin authored May 21, 2024
2 parents 0813925 + aa70b9f commit 7cea0e7
Show file tree
Hide file tree
Showing 11 changed files with 1,119 additions and 1,854 deletions.
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ next-env.d.ts
# custom workspace settings
.vscode
.idea
# contentlayer
.contentlayer

# worker
sw.*
Expand All @@ -50,5 +48,4 @@ workbox-*.*
!.env.project
!.env.vault

docker-compose.yml
migrations
.velite
23 changes: 0 additions & 23 deletions contentlayer.config.ts

This file was deleted.

3 changes: 3 additions & 0 deletions lefthook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

pre-commit:
commands:
typecheck:
glob: "src/**/*.{ts,tsx}"
run: npx tsc --noEmit
lint:
glob: "src/**/*.{ts,tsx,js,jsx}"
run: npx eslint {staged_files} --fix && git add {staged_files}
Expand Down
6 changes: 4 additions & 2 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
const { withContentlayer } = require("next-contentlayer");
const withPWA = require("@ducanh2912/next-pwa").default({
dest: "public",
disable: process.env.NODE_ENV !== "production",
Expand All @@ -16,6 +15,9 @@ const nextConfig = {
];
},
trailingSlash: true,
eslint: {
ignoreDuringBuilds: true,
}
};

module.exports = withPWA(withContentlayer(nextConfig));
module.exports = withPWA(nextConfig);
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"scripts": {
"dev": "prisma generate && next dev",
"dev:email": "email dev -p 9000",
"build": "prisma generate && prisma db push && next build",
"dev:content": "velite build --watch",
"build:content": "velite build --clean",
"build": "pnpm build:content && prisma generate && prisma db push && next build",
"start": "next start",
"lint": "next lint --dir src",
"format": "prettier --write 'src/**/*.{ts,tsx,js,jsx,css,json}'",
Expand Down Expand Up @@ -59,20 +61,19 @@
"autoprefixer": "10.4.16",
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"contentlayer": "^0.3.4",
"encoding": "^0.1.13",
"eslint": "8.56.0",
"eslint-config-next": "14.2.2",
"eslint-config-prettier": "^9.1.0",
"eslint-config-prettier": "^8.10.0",
"lefthook": "^1.5.5",
"next-contentlayer": "^0.3.4",
"prettier": "3.2.5",
"prettier-plugin-tailwindcss": "^0.5.9",
"prisma": "^5.7.0",
"sharp": "^0.33.1",
"tailwind-merge": "^2.3.0",
"tailwindcss": "3.4.1",
"tailwindcss-animate": "^1.0.7",
"typescript": "5.3.3"
"typescript": "5.3.3",
"velite": "0.1.0-rc.3"
}
}
Loading

0 comments on commit 7cea0e7

Please sign in to comment.