Go to file
2025-04-25 11:33:05 +08:00
.vscode update 2025-04-25 11:11:17 +08:00
e2e first commit 2025-04-25 11:09:29 +08:00
public first commit 2025-04-25 11:09:29 +08:00
src update 2025-04-25 11:22:36 +08:00
.dockerignore update 2025-04-25 11:26:38 +08:00
.editorconfig first commit 2025-04-25 11:09:29 +08:00
.gitattributes first commit 2025-04-25 11:09:29 +08:00
.gitignore update 2025-04-25 11:11:17 +08:00
.prettierrc.json first commit 2025-04-25 11:09:29 +08:00
docker-compose.yml update 2025-04-25 11:26:38 +08:00
Dockerfile update 2025-04-25 11:33:05 +08:00
env.d.ts first commit 2025-04-25 11:09:29 +08:00
eslint.config.ts first commit 2025-04-25 11:09:29 +08:00
index.html update 2025-04-25 11:22:36 +08:00
nginx.conf update 2025-04-25 11:26:38 +08:00
package.json update 2025-04-25 11:22:36 +08:00
playwright.config.ts first commit 2025-04-25 11:09:29 +08:00
README.md update 2025-04-25 11:26:38 +08:00
tsconfig.app.json first commit 2025-04-25 11:09:29 +08:00
tsconfig.json first commit 2025-04-25 11:09:29 +08:00
tsconfig.node.json first commit 2025-04-25 11:09:29 +08:00
tsconfig.vitest.json first commit 2025-04-25 11:09:29 +08:00
vite.config.ts update 2025-04-25 11:22:36 +08:00
vitest.config.ts first commit 2025-04-25 11:09:29 +08:00

icrypto.work

这是一个加密货币AI服务平台基于Vue 3和Vite开发。

推荐的IDE设置

VSCode + Volar (并禁用Vetur)。

.vue导入的TypeScript支持

TypeScript默认无法处理.vue导入的类型信息,因此我们用vue-tsc替换tsc CLI进行类型检查。在编辑器中我们需要Volar使TypeScript语言服务识别.vue类型。

自定义配置

参见Vite配置参考

项目设置

npm install

开发环境编译和热重载

npm run dev

类型检查、编译和生产环境构建

npm run build

使用Vitest运行单元测试

npm run test:unit

使用Playwright运行端到端测试

# 首次运行安装浏览器
npx playwright install

# 在CI上测试时必须先构建项目
npm run build

# 运行端到端测试
npm run test:e2e
# 仅在Chromium上运行测试
npm run test:e2e -- --project=chromium
# 运行特定文件的测试
npm run test:e2e -- tests/example.spec.ts
# 在调试模式下运行测试
npm run test:e2e -- --debug

使用ESLint进行代码检查

npm run lint

Docker部署

本项目支持Docker部署包含以下文件:

  • Dockerfile - 多阶段构建配置
  • .dockerignore - 排除不需要的文件
  • docker-compose.yml - 简化部署配置
  • nginx.conf - Nginx优化配置

使用Docker构建和运行

构建Docker镜像:

docker build -t icrypto-web .

运行容器:

docker run -p 80:80 icrypto-web

使用Docker Compose部署

一键构建和部署:

docker-compose up -d

停止服务:

docker-compose down