Skip to content

Commit 7118e43

Browse files
author
sunlin92
committed
refactor: 重构项目工具链
1 parent 36663b1 commit 7118e43

File tree

370 files changed

+26113
-72693
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

370 files changed

+26113
-72693
lines changed

.env.development

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VITE_BASE_URL = 'http://localhost:5000/'
1+
VITE_BASE_URL = 'http://127.0.0.1:5000/'

.eslintignore

Lines changed: 0 additions & 7 deletions
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 59 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/bug-report.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ about: Create a report to help us improve
44
title: ''
55
labels: ''
66
assignees: ''
7-
87
---
98

109
**重现步骤(可选):**

.github/ISSUE_TEMPLATE/feature-request.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ about: Suggest an idea for this project
44
title: ''
55
labels: ''
66
assignees: ''
7-
87
---
98

109
**描述你希望的支持的新功能?**

.github/workflows/ci.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
lint:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
node-version: [20, 22]
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
19+
- name: Setup pnpm
20+
uses: pnpm/action-setup@v4
21+
with:
22+
version: 10
23+
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: ${{ matrix.node-version }}
28+
cache: pnpm
29+
30+
- name: Install dependencies
31+
run: pnpm install --frozen-lockfile
32+
33+
- name: Lint And Format Check
34+
run: pnpm quality:check
35+
36+
test:
37+
runs-on: ubuntu-latest
38+
needs: lint
39+
40+
steps:
41+
- name: Checkout repository
42+
uses: actions/checkout@v4
43+
44+
- name: Setup pnpm
45+
uses: pnpm/action-setup@v4
46+
with:
47+
version: 10
48+
49+
- name: Setup Node.js
50+
uses: actions/setup-node@v4
51+
with:
52+
node-version: 20
53+
cache: pnpm
54+
55+
- name: Install dependencies
56+
run: pnpm install --frozen-lockfile
57+
58+
- name: Test
59+
run: pnpm test:run
60+
61+
build:
62+
runs-on: ubuntu-latest
63+
needs: lint
64+
65+
steps:
66+
- name: Checkout repository
67+
uses: actions/checkout@v4
68+
69+
- name: Setup pnpm
70+
uses: pnpm/action-setup@v4
71+
with:
72+
version: 10
73+
74+
- name: Setup Node.js
75+
uses: actions/setup-node@v4
76+
with:
77+
node-version: 20
78+
cache: pnpm
79+
80+
- name: Install dependencies
81+
run: pnpm install --frozen-lockfile
82+
83+
- name: Build
84+
run: pnpm build

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
.DS_Store
22
node_modules
33
/dist
4+
/coverage
5+
/.vite
46
/script/.cache
57

68
# local env files
@@ -22,3 +24,8 @@ pnpm-debug.log*
2224
*.njsproj
2325
*.sln
2426
*.sw?
27+
/.playwright
28+
/.codex
29+
/test-results
30+
/playwright-report
31+
/.trae

.husky/commit-msg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pnpm exec commitlint --edit "$1"

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pnpm lint:staged

.prettierignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
dist
2+
coverage
3+
node_modules
4+
.vite
5+
public/static/img
6+
src/assets/style/fonts

0 commit comments

Comments
 (0)