Skip to content

Commit 306be33

Browse files
committed
change framework vite
1 parent 485a2ac commit 306be33

Some content is hidden

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

48 files changed

+4464
-497
lines changed

.browserslistrc

-16
This file was deleted.

.editorconfig

-7
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,3 @@ insert_final_newline = true
3636

3737
## 设置为true以删除换行符之前的任何空格字符,设置为false以确保不会。
3838
trim_trailing_whitespace = true
39-
40-
[*.ts]
41-
quote_type = single
42-
43-
[*.md]
44-
max_line_length = off
45-
trim_trailing_whitespace = false

.eslintignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
dist
3+
out
4+
.gitignore

.eslintrc.cjs

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/* eslint-env node */
2+
require('@rushstack/eslint-patch/modern-module-resolution');
3+
4+
module.exports = {
5+
extends: ['eslint:recommended', 'plugin:vue/vue3-recommended', '@electron-toolkit', '@vue/eslint-config-prettier'],
6+
rules: {
7+
'vue/require-default-prop': 'off',
8+
'vue/multi-word-component-names': 'off',
9+
},
10+
};

.eslintrc.js

-15
This file was deleted.

.npmrc

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/
2+
shamefully-hoist=true

.prettierignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
out
2+
dist
3+
pnpm-lock.yaml
4+
LICENSE.md
5+
tsconfig.json
6+
tsconfig.*.json

.prettierrc

-13
This file was deleted.

.prettierrc.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
tabWidth: 2
2+
semi: true
3+
singleQuote: true
4+
jsxSingleQuote: true
5+
bracketSpacing: true
6+
jsxBracketSameLine: true
7+
printWidth: 140
8+
endOfLine: auto
9+
proseWrap: preserve
10+
trailingComma: es5
11+
useTabs: false

.stylelintignore

-8
This file was deleted.

.stylelintrc.json

-16
This file was deleted.

.vscode/extensions.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["dbaeumer.vscode-eslint"]
3+
}

.vscode/launch.json

+28-21
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,39 @@
11
{
22
"version": "0.2.0",
3-
"compounds": [
4-
{
5-
"name": "Main + renderer",
6-
"configurations": ["Main", "Renderer"],
7-
"stopAll": true
8-
}
9-
],
103
"configurations": [
114
{
12-
"name": "Renderer",
13-
"port": 9222,
14-
"request": "attach",
15-
"type": "chrome",
16-
"webRoot": "${workspaceFolder}"
17-
},
18-
{
19-
"name": "Main",
5+
"name": "Debug Main Process",
206
"type": "node",
217
"request": "launch",
22-
"cwd": "${workspaceFolder}",
23-
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron",
8+
"cwd": "${workspaceRoot}",
9+
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron-vite",
2410
"windows": {
25-
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd"
11+
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron-vite.cmd"
2612
},
27-
"args": [".", "--remote-debugging-port=9222"],
28-
"outputCapture": "std",
29-
"console": "integratedTerminal"
13+
"runtimeArgs": ["--sourcemap"],
14+
"env": {
15+
"REMOTE_DEBUGGING_PORT": "9222"
16+
}
17+
},
18+
{
19+
"name": "Debug Renderer Process",
20+
"port": 9222,
21+
"request": "attach",
22+
"type": "chrome",
23+
"webRoot": "${workspaceFolder}/src/renderer",
24+
"timeout": 60000,
25+
"presentation": {
26+
"hidden": true
27+
}
28+
}
29+
],
30+
"compounds": [
31+
{
32+
"name": "Debug All",
33+
"configurations": ["Debug Main Process", "Debug Renderer Process"],
34+
"presentation": {
35+
"order": 1
36+
}
3037
}
3138
]
3239
}

.vscode/settings.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"[typescript]": {
3+
"editor.defaultFormatter": "esbenp.prettier-vscode"
4+
},
5+
"[javascript]": {
6+
"editor.defaultFormatter": "esbenp.prettier-vscode"
7+
},
8+
"[json]": {
9+
"editor.defaultFormatter": "esbenp.prettier-vscode"
10+
}
11+
}

README.md

+34-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,35 @@
11
# WeLink-Themes
2-
WeLink主题设置工具
2+
WeLinkÖ÷ÌâÉèÖù¤¾ß
3+
4+
An Electron application with Vue
5+
6+
## Recommended IDE Setup
7+
8+
- [VSCode](https://code.visualstudio.com/) + [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) + [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar)
9+
10+
## Project Setup
11+
12+
### Install
13+
14+
```bash
15+
$ pnpm install
16+
```
17+
18+
### Development
19+
20+
```bash
21+
$ pnpm dev
22+
```
23+
24+
### Build
25+
26+
```bash
27+
# For windows
28+
$ pnpm build:win
29+
30+
# For macOS
31+
$ pnpm build:mac
32+
33+
# For Linux
34+
$ pnpm build:linux
35+
```

build/entitlements.mac.plist

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>com.apple.security.cs.allow-jit</key>
6+
<true/>
7+
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
8+
<true/>
9+
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
10+
<true/>
11+
</dict>
12+
</plist>

build/icon.icns

83.6 KB
Binary file not shown.

build/icon.ico

121 KB
Binary file not shown.

build/icon.png

35.1 KB
Loading

dev-app-update.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
provider: generic
2+
url: https://example.com/auto-updates
3+
updaterCacheDirName: welink-themes-updater

electron-builder.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
appId: com.electron.app
2+
productName: welink-themes
3+
directories:
4+
buildResources: build
5+
files:
6+
- '!**/.vscode/*'
7+
- '!src/*'
8+
- '!electron.vite.config.{js,ts,mjs,cjs}'
9+
- '!{.eslintignore,.eslintrc.cjs,.prettierignore,.prettierrc.yaml,dev-app-update.yml,CHANGELOG.md,README.md}'
10+
- '!{.env,.env.*,.npmrc,pnpm-lock.yaml}'
11+
asarUnpack:
12+
- resources/**
13+
win:
14+
executableName: welink-themes
15+
nsis:
16+
artifactName: ${name}-${version}-setup.${ext}
17+
shortcutName: ${productName}
18+
uninstallDisplayName: ${productName}
19+
createDesktopShortcut: always
20+
mac:
21+
entitlementsInherit: build/entitlements.mac.plist
22+
extendInfo:
23+
- NSCameraUsageDescription: Application requests access to the device's camera.
24+
- NSMicrophoneUsageDescription: Application requests access to the device's microphone.
25+
- NSDocumentsFolderUsageDescription: Application requests access to the user's Documents folder.
26+
- NSDownloadsFolderUsageDescription: Application requests access to the user's Downloads folder.
27+
notarize: false
28+
dmg:
29+
artifactName: ${name}-${version}.${ext}
30+
linux:
31+
target:
32+
- AppImage
33+
- snap
34+
- deb
35+
maintainer: electronjs.org
36+
category: Utility
37+
appImage:
38+
artifactName: ${name}-${version}.${ext}
39+
npmRebuild: false
40+
publish:
41+
provider: generic
42+
url: https://example.com/auto-updates

electron.vite.config.js

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { resolve } from 'path';
2+
import { defineConfig, externalizeDepsPlugin } from 'electron-vite';
3+
import vue from '@vitejs/plugin-vue';
4+
5+
export default defineConfig({
6+
main: {
7+
plugins: [externalizeDepsPlugin()],
8+
},
9+
preload: {
10+
plugins: [externalizeDepsPlugin()],
11+
},
12+
renderer: {
13+
resolve: {
14+
alias: {
15+
'@renderer': resolve('src/renderer/src'),
16+
},
17+
extensions: ['.js', '.jsx', '.vue'],
18+
},
19+
plugins: [vue()],
20+
define: {
21+
'process.env': { ...process.env },
22+
},
23+
},
24+
});

forge.config.js

-43
This file was deleted.

0 commit comments

Comments
 (0)