Skip to content

Commit 6d0c7a5

Browse files
committed
feat: support manifest-v3
rewrite the project using TypeScript+Vue3
1 parent 10251fc commit 6d0c7a5

Some content is hidden

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

65 files changed

+6140
-36836
lines changed

.browserslistrc

-3
This file was deleted.

.cz-config.js

-57
This file was deleted.

.env.chrome

-3
This file was deleted.

.env.chromezip

-3
This file was deleted.

.env.edge

-3
This file was deleted.

.env.edgezip

-3
This file was deleted.

.env.firefox

-3
This file was deleted.

.env.firefoxzip

-3
This file was deleted.

.eslintignore

-5
This file was deleted.

.eslintrc.js

-24
This file was deleted.

.gitignore

-5
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,3 @@ pnpm-debug.log*
2323
*.njsproj
2424
*.sln
2525
*.sw?
26-
27-
# file
28-
jsconfig.json
29-
tsconfig.json
30-
vetur.config.js

.mocharc.cjs

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
ui: 'bdd',
3+
spec: ['test/**/**.spec.ts'],
4+
import: 'tsx',
5+
require: 'jsdom-global/register',
6+
};

.versionrc.json

+3-15
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,15 @@
55
"type": "json"
66
},
77
{
8-
"filename": "./src/manifest/chrome/manifest.production.json",
8+
"filename": "./src/manifest/chrome/manifest.json",
99
"type": "json"
1010
},
1111
{
12-
"filename": "./src/manifest/chrome/manifest.development.json",
12+
"filename": "./src/manifest/firefox/manifest.json",
1313
"type": "json"
1414
},
1515
{
16-
"filename": "./src/manifest/firefox/manifest.production.json",
17-
"type": "json"
18-
},
19-
{
20-
"filename": "./src/manifest/firefox/manifest.development.json",
21-
"type": "json"
22-
},
23-
{
24-
"filename": "./src/manifest/edge/manifest.production.json",
25-
"type": "json"
26-
},
27-
{
28-
"filename": "./src/manifest/edge/manifest.development.json",
16+
"filename": "./src/manifest/edge/manifest.json",
2917
"type": "json"
3018
}
3119
]

CHANGELOG.md

-88
This file was deleted.

README.md

+8-14
Original file line numberDiff line numberDiff line change
@@ -27,36 +27,30 @@ Go to the [Microsoft Edge Addons](https://microsoftedge.microsoft.com/addons/det
2727

2828
### Environment
2929

30-
- Install [Node.js](https://nodejs.org/) 8.9 and above (_new version has integrated npm_)
30+
- Install [Node.js](https://nodejs.org/) 20
3131

3232
### Initialization
3333

3434
```bash
35-
# Install Vue CLI
36-
npm install @vue/cli -g
35+
# Install pnpm
36+
npm install -g pnpm
3737

3838
# Installation dependency
39-
npm install
39+
pnpm install
4040
```
4141

4242
### Build
4343

44-
- Build the Chrome version: `npm run build-chrome`
45-
- Build the Firefox version: `npm run build-firefox`
46-
- Build the Edge version: `npm run build-edge`
44+
- Build the Chrome version: `pnpm run build:c`
45+
- Build the Firefox version: `pnpm run build:f`
46+
- Build the Edge version: `pnpm run build:e`
4747

4848
### Related
4949

50-
- Package configuration is located in `vue.config.js`
50+
- Package configuration is located in `vite.config.ts`
5151
- Extension source code is in the `src` directory
5252
- Without changing the configuration, all files and folders in the `src/assets` directory will be automatically copied to the root directory when packaging
5353

54-
## Thanks
55-
56-
- [zloirock/core-js](https://github.com/zloirock/core-js)
57-
- [ElemeFE/element](https://github.com/ElemeFE/element)
58-
- [vuejs/vue](https://github.com/vuejs/vue)
59-
6054
## Licence
6155

6256
[MIT](/LICENSE) License

README_CN.md

+8-16
Original file line numberDiff line numberDiff line change
@@ -27,38 +27,30 @@
2727

2828
### 环境需求
2929

30-
- 安装 [Node.js](https://nodejs.org/) 8.9 及以上 (_新版本已集成 npm,若您的网络环境不佳,推荐安装使用 [cnpm](https://github.com/cnpm/cnpm)_)
30+
- 安装 [Node.js](https://nodejs.org/) 20
3131

3232
### 初始化指令
3333

3434
```bash
35-
# 安装 Vue CLI
36-
npm install @vue/cli -g
35+
# 安装 pnpm
36+
npm install -g pnpm
3737

3838
# 安装依赖
39-
npm install
39+
pnpm install
4040
```
4141

4242
### 构建指令
4343

44-
- 构建 chrome 版本: `npm run build-chrome`
45-
- 构建 firefox 版本: `npm run build-firefox`
46-
- 构建 edge 版本: `npm run build-edge`
44+
- 构建 chrome 版本: `npm run build:c`
45+
- 构建 firefox 版本: `npm run build:f`
46+
- 构建 edge 版本: `npm run build:e`
4747

4848
### 相关目录及文件
4949

50-
- 与打包相关的配置位于 `vue.config.js` 文件中
50+
- 与打包相关的配置位于 `vite.config.ts` 文件中
5151
- 扩展程序源代码位于 `src` 目录中
5252
- 未改动配置的情况下,`src/assets` 目录下所有文件及文件夹在打包时会自动复制到项目根目录
5353

54-
## 致谢
55-
56-
本项目基于以下开源项目进行构建:
57-
58-
- [zloirock/core-js](https://github.com/zloirock/core-js)
59-
- [ElemeFE/element](https://github.com/ElemeFE/element)
60-
- [vuejs/vue](https://github.com/vuejs/vue)
61-
6254
## 许可证
6355

6456
[MIT](/LICENSE) License

auto-imports.d.ts

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/* eslint-disable */
2+
/* prettier-ignore */
3+
// @ts-nocheck
4+
// noinspection JSUnusedGlobalSymbols
5+
// Generated by unplugin-auto-import
6+
export {}
7+
declare global {
8+
9+
}

babel.config.js

-12
This file was deleted.

0 commit comments

Comments
 (0)