放弃CF部署

This commit is contained in:
York 2025-02-20 14:29:32 +08:00
parent e0663af024
commit 73be657e10
3 changed files with 16 additions and 54 deletions

View File

@ -1,16 +1,10 @@
# 牛子小助手 (DickHelper)
![DickHelper](https://socialify.git.ci/zzzdajb/DickHelper/image?language=1&name=1&stargazers=1&theme=Light)
[![React](https://img.shields.io/badge/React-19.0.0-blue.svg)](https://reactjs.org/)
[![TypeScript](https://img.shields.io/badge/TypeScript-5.7.2-blue.svg)](https://www.typescriptlang.org/)
[![Vite](https://img.shields.io/badge/Vite-6.1.0-646CFF.svg)](https://vitejs.dev/)
[![Material-UI](https://img.shields.io/badge/MUI-6.4.5-0081CB.svg)](https://mui.com/)
## 项目简介 | Introduction
牛子小助手是一个帮助用户科学自慰的工具应用。它提供了记录、统计和分析功能,帮助用户更好地了解自己的习惯。
GoodDick Assistant is a tool application that helps users masturbate scientifically. It provides recording, statistics, and analysis functions to help users better understand their habits.
## 特点 | Features
- 🔒 **数据安全**: 所有数据完全存储在本地,无需担心隐私泄露
@ -25,13 +19,6 @@ GoodDick Assistant is a tool application that helps users masturbate scientifica
- 🌐 **无需后端**: 纯前端应用,无需服务器
- Frontend-only application, no backend required
## 在线演示 | Online Demo
你可以访问以下链接体验在线版本:
You can try the online version here:
[https://yourusername.github.io/GoodDick](https://yourusername.github.io/GoodDick)
## 本地部署 | Local Deployment
如果你想在本地运行此项目,请按照以下步骤操作:
@ -39,7 +26,7 @@ If you want to run this project locally, follow these steps:
```bash
# 克隆项目 | Clone the repository
git clone https://github.com/zzzdajb/DickHelper.git
git clone https://github.com/yourusername/GoodDick.git
# 进入项目目录 | Enter the project directory
cd GoodDick
@ -53,28 +40,8 @@ npm run dev
## 云端部署 | Cloud Deployment
本项目是纯前端应用,可以轻松部署到各种静态网站托管平台。以下是两个推荐的免费托管方案:
This is a frontend-only application that can be easily deployed to various static site hosting platforms. Here are two recommended free hosting solutions:
### Cloudflare Pages
1. 在 GitHub 上创建仓库并推送代码
Create a repository on GitHub and push your code
2. 登录 [Cloudflare Pages](https://pages.cloudflare.com)
Login to Cloudflare Pages
3. 点击 "Create a project" 并选择你的 GitHub 仓库
Click "Create a project" and select your GitHub repository
4. 配置构建设置 | Configure build settings:
- Build command: `npm run build`
- Build output directory: `dist`
- Framework preset: `Vite`
- Deploy command: `npm run build`(与构建命令相同)
5. 点击 "Save and Deploy"
Click "Save and Deploy"
本项目是纯前端应用,可以轻松部署到各种静态网站托管平台。
This is a frontend-only application that can be easily deployed to various static site hosting platforms.
### Vercel

View File

@ -5,30 +5,32 @@
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"build": "tsc && vite build",
"preview": "vite preview"
},
"dependencies": {
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.0",
"@eslint/js": "^9.19.0",
"@mui/icons-material": "^6.4.5",
"@mui/material": "^6.4.5",
"@types/uuid": "^10.0.0",
"chart.js": "^4.4.7",
"react": "^19.0.0",
"react-chartjs-2": "^5.3.0",
"react-dom": "^19.0.0",
"uuid": "^11.0.5"
},
"devDependencies": {
"@eslint/js": "^9.19.0",
"@types/react": "^19.0.8",
"@types/react-dom": "^19.0.3",
"@types/uuid": "^10.0.0",
"@vitejs/plugin-react": "^4.3.4",
"chart.js": "^4.4.7",
"eslint": "^9.19.0",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "^0.4.18",
"globals": "^15.14.0",
"react": "^19.0.0",
"react-chartjs-2": "^5.3.0",
"react-dom": "^19.0.0",
"typescript": "~5.7.2",
"typescript-eslint": "^8.22.0",
"uuid": "^11.0.5",
"vite": "^6.1.0"
}
}

View File

@ -3,16 +3,9 @@ import react from '@vitejs/plugin-react'
export default defineConfig({
plugins: [react()],
base: '', // 修改这里
base: './',
build: {
outDir: 'dist',
assetsDir: 'assets',
sourcemap: false,
minify: true,
rollupOptions: {
output: {
manualChunks: undefined
}
}
assetsDir: 'assets'
}
})