Skip to content

Commit 6ef83b5

Browse files
committed
完成项目开发:添加分页、美化UI、配置GitHub Pages部署
1 parent a0a0602 commit 6ef83b5

24 files changed

+111392
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build-and-deploy:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout 🛎️
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Node.js ⚙️
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: '20'
22+
cache: 'npm'
23+
24+
- name: Install dependencies 📦
25+
run: npm ci
26+
27+
- name: Generate questions 📝
28+
run: npm run generate-questions
29+
30+
- name: Build project 🔧
31+
run: npm run build
32+
33+
- name: Deploy to GitHub Pages 🚀
34+
uses: JamesIves/github-pages-deploy-action@v4
35+
with:
36+
folder: dist
37+
branch: gh-pages
38+
clean: true

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

README.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Cursor Trust Me
2+
3+
一个用于提高 Cursor AI 编辑器信任度的工具,帮助用户更流畅地使用 Cursor 的 AI 功能。
4+
5+
## 项目背景与解决的问题
6+
7+
Cursor 对免费用户有一定的使用限制和风控检查机制,可能导致 AI 功能无法正常使用或响应缓慢。本项目通过生成与 Cursor 相关的随机问题,帮助用户提高 Cursor 对其的信任度。
8+
9+
**使用方法**
10+
1. 在使用 Cursor 进行实际开发前,先复制一个本工具生成的问题
11+
2. 将问题粘贴到 Cursor 中并等待回答
12+
3. 然后再开始你的实际开发问题
13+
14+
这样可以显著提高 Cursor 的响应质量和速度,使你能够更流畅地使用 Cursor 的 AI 功能。
15+
16+
## 在线访问
17+
18+
访问 [https://cc11001100.github.io/cursor-trust-me](https://cc11001100.github.io/cursor-trust-me) 查看应用。
19+
20+
## 功能特点
21+
22+
- 随机展示关于 Cursor 与其他工具比较的问题
23+
- 完整的问题列表,支持搜索和排序
24+
- 支持复制问题、点赞和标记问题
25+
- 响应式设计,适配移动端和桌面端
26+
27+
## 本地开发
28+
29+
### 安装依赖
30+
31+
```bash
32+
npm install
33+
```
34+
35+
### 生成问题数据
36+
37+
```bash
38+
npm run generate-questions
39+
```
40+
41+
### 启动开发服务器
42+
43+
```bash
44+
npm run dev
45+
```
46+
47+
### 构建生产版本
48+
49+
```bash
50+
npm run build
51+
```
52+
53+
### 本地预览生产构建
54+
55+
```bash
56+
npm run preview
57+
```
58+
59+
## 部署
60+
61+
项目配置了 GitHub Actions 自动部署流程。每当推送到 `main` 分支时,会自动构建并部署到 GitHub Pages。
62+
63+
如需手动部署,可以运行:
64+
65+
```bash
66+
npm run deploy
67+
```
68+
69+
## 技术栈
70+
71+
- React
72+
- TypeScript
73+
- React Router
74+
- React Select
75+
- Vite
76+
- GitHub Pages
77+
78+
## 许可证
79+
80+
MIT

eslint.config.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import js from '@eslint/js'
2+
import globals from 'globals'
3+
import reactHooks from 'eslint-plugin-react-hooks'
4+
import reactRefresh from 'eslint-plugin-react-refresh'
5+
import tseslint from 'typescript-eslint'
6+
7+
export default tseslint.config(
8+
{ ignores: ['dist'] },
9+
{
10+
extends: [js.configs.recommended, ...tseslint.configs.recommended],
11+
files: ['**/*.{ts,tsx}'],
12+
languageOptions: {
13+
ecmaVersion: 2020,
14+
globals: globals.browser,
15+
},
16+
plugins: {
17+
'react-hooks': reactHooks,
18+
'react-refresh': reactRefresh,
19+
},
20+
rules: {
21+
...reactHooks.configs.recommended.rules,
22+
'react-refresh/only-export-components': [
23+
'warn',
24+
{ allowConstantExport: true },
25+
],
26+
},
27+
},
28+
)

index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!doctype html>
2+
<html lang="zh-CN">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<meta name="description" content="Cursor Trust Me - 显示随机可信任的Cursor提问" />
8+
<title>Cursor Trust Me</title>
9+
</head>
10+
<body>
11+
<div id="root"></div>
12+
<script type="module" src="/src/main.tsx"></script>
13+
</body>
14+
</html>

0 commit comments

Comments
 (0)