Skip to content

Commit

Permalink
Merge pull request #5 from yoniu/dev
Browse files Browse the repository at this point in the history
使用 NextJS 重构 & 修复播放器无法暂停问题
  • Loading branch information
yoniu authored Nov 1, 2024
2 parents dcc4c79 + 5326ae4 commit 8074d62
Show file tree
Hide file tree
Showing 20 changed files with 762 additions and 354 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ dist/
.idea

.env

.next
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

个人主页。

基于 React / TypeScript / Rsbuild / ShadcnUI / TailwindCSS 开发。
基于 NextJS / React / TypeScript / ShadcnUI / TailwindCSS 开发。

![屏幕截图](./screenshot.png)

Expand All @@ -27,9 +27,3 @@ Build the app for production:
```bash
pnpm build
```

Preview the production build locally:

```bash
pnpm preview
```
6 changes: 3 additions & 3 deletions components.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
"style": "default",
"tailwind": {
"config": "tailwind.config.js",
"css": "src/app/globals.css",
"css": "styles/globals.css",
"baseColor": "zinc",
"cssVariables": true
},
"rsc": false,
"tsx": false,
"aliases": {
"utils": "~/lib/utils",
"components": "~/components"
"utils": "lib/utils",
"components": "components"
}
}

2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ export default [
...reactHooks.configs.recommended.rules,
},
},
{ ignores: ['dist/'] },
{ ignores: ['dist/', 'components/ui/'] },
];
5 changes: 5 additions & 0 deletions next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
8 changes: 8 additions & 0 deletions next.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import type { NextConfig } from 'next'

const nextConfig: NextConfig = {
output: 'export',
distDir: 'dist',
}

export default nextConfig
16 changes: 7 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
{
"name": "homepage",
"private": true,
"version": "1.0.0",
"version": "1.1.0",
"scripts": {
"build": "rsbuild build",
"dev": "rsbuild dev --open",
"format": "prettier --write .",
"lint": "eslint .",
"preview": "rsbuild preview"
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@radix-ui/react-icons": "^1.3.0",
"@radix-ui/react-separator": "^1.1.0",
"@radix-ui/react-slot": "^1.1.0",
"@rsbuild/plugin-less": "^1.1.0",
"ahooks": "^3.8.1",
"autoprefixer": "^10.4.20",
"class-variance-authority": "^0.7.0",
Expand All @@ -23,16 +21,16 @@
"howler": "^2.2.4",
"leancloud-storage": "^4.15.2",
"lucide-react": "^0.454.0",
"next": "^15.0.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"sass": "^1.80.5",
"tailwind-merge": "^2.5.4",
"tailwindcss-animate": "^1.0.7"
},
"devDependencies": {
"@eslint/compat": "^1.2.0",
"@eslint/js": "^9.12.0",
"@rsbuild/core": "^1.0.18",
"@rsbuild/plugin-react": "^1.0.5",
"@types/howler": "^2.2.12",
"@types/node": "^22.8.4",
"@types/react": "^18.3.12",
Expand Down
Loading

0 comments on commit 8074d62

Please sign in to comment.