Skip to content

Commit d702c07

Browse files
committed
Migrate to WXT
1 parent ca79703 commit d702c07

23 files changed

+351
-281
lines changed

.github/workflows/submit.yml

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

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pnpm-debug.log*
88
lerna-debug.log*
99

1010
node_modules
11-
.output
11+
dist
1212
artifacts
1313
*.local
1414
coverage

.prettierignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ dist-*
33
artifacts
44
coverage
55
.wxt
6-
.output
6+
dist
77
coverage
88
*.lock

bun.lock

Lines changed: 286 additions & 127 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,38 +6,34 @@
66
"type": "module",
77
"scripts": {
88
"check": "check",
9-
"dev": "wxt",
10-
"dev:firefox": "wxt --browser firefox",
11-
"build": "wxt build",
12-
"build:firefox": "wxt build --browser firefox",
9+
"dev": "vite",
10+
"build": "vite build",
1311
"test": "vitest",
1412
"test:coverage": "vitest run --coverage",
15-
"zip": "wxt zip",
16-
"zip:firefox": "wxt zip -b firefox",
17-
"prepare": "simple-git-hooks",
18-
"postinstall": "wxt prepare"
13+
"prepare": "simple-git-hooks"
1914
},
2015
"dependencies": {
2116
"@aklinker1/check": "^1.4.5",
2217
"@tanstack/vue-query": "^5.59.13",
2318
"@webext-core/messaging": "^2.0.2",
2419
"@webext-core/proxy-service": "^1.2.0",
20+
"@wxt-dev/storage": "^1.1.0",
2521
"async-mutex": "^0.5.0",
2622
"fast-deep-equal": "^3.1.3",
2723
"minimatch": "^10.0.1",
2824
"ofetch": "^1.4.1"
2925
},
3026
"devDependencies": {
3127
"@aklinker1/generate-changelog": "^1.1.2",
28+
"@crxjs/vite-plugin": "^2.0.0-beta.31",
3229
"@iconify/json": "^2.2.261",
3330
"@tailwindcss/vite": "^4.0.6",
3431
"@types/bun": "^1.1.11",
35-
"@types/chrome": "^0.0.278",
32+
"@types/chrome": "^0.0.304",
3633
"@types/jsdom": "^21.1.7",
34+
"@vitejs/plugin-vue": "^5.2.1",
3735
"@vitest/coverage-v8": "^2.1.3",
38-
"@wxt-dev/auto-icons": "^1.0.2",
3936
"@wxt-dev/i18n": "^0.2.1",
40-
"@wxt-dev/module-vue": "^1.0.1",
4137
"daisyui": "^5.0.0-beta.7",
4238
"env-cmd": "^10.1.0",
4339
"fast-glob": "^3.3.2",
@@ -49,10 +45,10 @@
4945
"tailwindcss": "^4.0.6",
5046
"typescript": "^5.6.3",
5147
"unplugin-icons": "^0.19.3",
48+
"vite": "6.0.8",
5249
"vitest": "^2.1.3",
5350
"vue": "^3.5.12",
54-
"vue-tsc": "^2.1.6",
55-
"wxt": "^0.19.11"
51+
"vue-tsc": "^2.1.6"
5652
},
5753
"simple-git-hooks": {
5854
"pre-commit": "bun lint-staged"

src/components/CommitDiff.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import { i18n } from "@/utils/i18n";
2+
import { createDiffComponent } from "./createDiffComponent";
3+
14
export const CommitDiff = createDiffComponent({
25
getAdditionsElement: () =>
36
document.querySelector<HTMLElement>("#toc>*>strong:nth-child(2)"),

src/components/CompareDiff.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import { i18n } from "@/utils/i18n";
2+
import { createDiffComponent } from "./createDiffComponent";
3+
14
export const CompareDiff = createDiffComponent({
25
getAdditionsElement: () =>
36
document.querySelectorAll<HTMLElement>(".toc-diff-stats>strong")[0],

src/components/CustomListItem.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
<script lang="ts" setup>
2+
import { i18n } from "@/utils/i18n";
3+
24
defineProps<{
35
value: string;
46
}>();

src/components/CustomListsPref.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import { computed } from "vue";
33
import type { CustomLists } from "@/utils/storage";
44
import CustomListItem from "./CustomListItem.vue";
5+
import { i18n } from "@/utils/i18n";
56
67
const customLists = defineModel<CustomLists>("customLists", { required: true });
78

src/components/OptionsForm.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ import {
88
githubPatStorage,
99
customListsStorage,
1010
} from "@/utils/storage";
11+
import { useForm } from "@/composables/useForm";
12+
import { commitHashDiffsCache } from "@/utils/global-cache";
13+
import { i18n } from "@/utils/i18n";
1114
1215
const { state, hasChanges, reset, saveChanges } = useForm<{
1316
hideGeneratedLineCount: boolean;

0 commit comments

Comments
 (0)