Skip to content

Commit 6bb3d3e

Browse files
authored
chore: remove unused dependencies and plugins (#8)
* chore: remove unused dependencies and plugins * Remove unnecessary script from postinstall * Remove simple-git-hooks from devDependencies * Update job name to "Linting and Type Checking" in ci.yml * Add Netlify configuration and remove Vercel configuration * Update typecheck script in package.json * Update CI workflow to include linting, type checking, and unit testing * Update pnpm version to 8 * Delete route.test.ts and route.ts * Add useRouteQuery test and update useRouteQuery implementation * Add use-sync-query-url test and update use-sync-query-url implementation * Remove unused import statements
1 parent dae0900 commit 6bb3d3e

File tree

13 files changed

+220
-408
lines changed

13 files changed

+220
-408
lines changed

.github/workflows/ci.yml

Lines changed: 48 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,62 @@ on:
1010
- main
1111

1212
jobs:
13-
ci:
14-
name: Eslint
13+
lint:
1514
runs-on: ubuntu-latest
16-
1715
steps:
18-
- name: Checkout
19-
uses: actions/checkout@v4
20-
21-
- name: Install Node.js
22-
uses: actions/setup-node@v4
16+
- uses: actions/checkout@v4
17+
- uses: pnpm/action-setup@v3
18+
with:
19+
version: 8
20+
- uses: actions/setup-node@v4
2321
with:
24-
node-version: 20
22+
node-version: lts/*
23+
cache: pnpm
2524

26-
- name: Install pnpm
27-
uses: pnpm/action-setup@v3
25+
- name: Install
26+
run: pnpm install
27+
28+
- name: Lint
29+
run: pnpm run lint
30+
31+
typecheck:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v4
35+
- uses: pnpm/action-setup@v3
2836
with:
2937
version: 8
38+
- uses: actions/setup-node@v4
39+
with:
40+
node-version: lts/*
41+
cache: pnpm
3042

31-
- name: Install dependencies
43+
- name: Install
3244
run: pnpm install
3345

34-
- name: Perform linting
35-
run: pnpm run lint
46+
- name: Typecheck
47+
run: pnpm run typecheck
48+
49+
test:
50+
runs-on: ${{ matrix.os }}
51+
52+
strategy:
53+
matrix:
54+
node-version: [18.x, 20.x]
55+
os: [ubuntu-latest]
56+
fail-fast: false
3657

37-
- name: Perform prettifying
38-
run: pnpm run format
58+
steps:
59+
- uses: actions/checkout@v4
60+
- uses: pnpm/action-setup@v3
61+
with:
62+
version: 8
63+
- name: Use Node.js ${{ matrix.node-version }}
64+
uses: actions/setup-node@v4
65+
with:
66+
node-version: ${{ matrix.node-version }}
67+
registry-url: https://registry.npmjs.org/
68+
cache: pnpm
3969

40-
- name: Perform type checking
41-
run: pnpm run type:check
70+
- run: pnpm install
71+
- run: pnpm run test:unit

netlify.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[build]
2+
publish = "dist"
3+
command = "pnpm run build:only"
4+
5+
[build.environment]
6+
NODE_VERSION = "20"
7+
8+
[[redirects]]
9+
from = "/*"
10+
to = "/index.html"
11+
status = 200
12+
13+
[[headers]]
14+
for = "/manifest.webmanifest"
15+
16+
[headers.values]
17+
Content-Type = "application/manifest+json"

package.json

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88
"preview": "vite preview",
99
"build:only": "vite build",
1010
"build:icons": "tsx src/plugins/assets/build-icons.ts",
11-
"type:check": "vue-tsc --noEmit --composite false",
11+
"typecheck": "vue-tsc --noEmit",
1212
"lint": "eslint .",
1313
"lint:fix": "eslint --fix .",
1414
"format": "prettier --write src/",
1515
"test:unit": "vitest",
1616
"test:e2e": "start-server-and-test preview http://localhost:4173 'cypress run --e2e'",
1717
"test:e2e:dev": "start-server-and-test 'vite dev --port 4173' http://localhost:4173 'cypress open --e2e'",
18-
"postinstall": "run-p generate:api build:icons",
18+
"postinstall": "run-p build:icons",
1919
"generate:api": "openapi-typescript http://localhost:8000/api/docs-yaml -o src/generated/api-schema.d.ts"
2020
},
2121
"dependencies": {
@@ -25,7 +25,6 @@
2525
"openapi-fetch": "^0.9.2",
2626
"openapi-typescript-helpers": "^0.0.7",
2727
"pinia": "^2.1.7",
28-
"ts-pattern": "^5.0.6",
2928
"ufo": "^1.5.3",
3029
"universal-cookie": "^7.1.0",
3130
"valibot": "^0.26.0",
@@ -46,7 +45,6 @@
4645
"cypress": "^13.6.3",
4746
"eslint": "^8.56.0",
4847
"jsdom": "^24.0.0",
49-
"lint-staged": "^15.2.0",
5048
"npm-run-all": "^4.1.5",
5149
"openapi-typescript": "^6.7.4",
5250
"picocolors": "^1.0.0",
@@ -60,7 +58,6 @@
6058
"unplugin-vue-components": "^0.26.0",
6159
"unplugin-vue-router": "^0.7.0",
6260
"vite": "^5.0.12",
63-
"vite-plugin-checker": "^0.6.2",
6461
"vite-plugin-pages": "^0.32.0",
6562
"vite-plugin-vue-devtools": "^7.0.11",
6663
"vite-plugin-vue-layouts": "^0.11.0",
@@ -71,12 +68,5 @@
7168
"simple-git-hooks": {
7269
"commit-msg": "node src/scripts/verify-commit.js"
7370
},
74-
"lint-staged": {
75-
"src/**/*.{js,ts,vue}": [
76-
"npm run lint",
77-
"npm run format",
78-
"npm run type:check"
79-
]
80-
},
8171
"prettier": "@sxzz/prettier-config"
8272
}

0 commit comments

Comments
 (0)