Skip to content

Commit c8d37b3

Browse files
committed
1.0.0 Version release: Refactors
1 parent e09eb0e commit c8d37b3

File tree

33 files changed

+681
-537
lines changed

33 files changed

+681
-537
lines changed

README.md

Lines changed: 61 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
![bigLogo](http://otsu.fun/big_logo.png)
2+
23
# 🔥vue-cli-electron-template
3-
⭐Using `vue-cli 3` and `Electron 8` built a modular desktop application template. Convenient packaging and program language switching, with a custom borderless window, including `vue-router`, `vue-i18n`, `axios`, `electron-builder` and more common components, as well as some demo functions.
44

55
![npm](https://img.shields.io/npm/v/@vue/cli?color=aa&label=vue-cli)
66
![GitHub package.json version](https://img.shields.io/github/package-json/v/Pure-Peace/vue-cli-electron-template?color=yellow&logo=yellow&logoColor=yellow)
@@ -10,100 +10,105 @@
1010
![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/Pure-Peace/vue-cli-electron-template?color=aa&label=Lightweight&logo=aa&logoColor=aa)
1111
![GitHub last commit](https://img.shields.io/github/last-commit/Pure-Peace/vue-cli-electron-template)
1212

13+
⭐ Using **vue-cli 4** and **Electron 8.x** built a modular desktop application template.
14+
15+
The directory structure is clear and the main process (electron) is separated from the rendering process (vue), which is easy to extend and manage.
16+
17+
Fast packaging, one-click multi-language switch. Use custom borderless windows, has added easy-to-use **svg** icon components, and **axios** , **vuex**, **vue-router**, **vue-i18n** and global bus **bus**, out of the box, project extremely fast start.
1318

14-
- 🌺English / 💖[中文](https://github.com/Pure-Peace/vue-cli-electron-template/blob/master/README_ZH.md)
19+
- [English](https://github.com/Pure-Peace/vue-cli-electron-template/blob/master/README.md) / 💖 中文
20+
- [Simple document](https://github.com/Pure-Peace/vue-cli-electron-template/wiki)
1521

16-
<h2 align="center">⚡-Introduction-</h2>
22+
## Release Notes:
1723

18-
🚀A lightweight, modular template. Added common plugins and demo features. You can happily use the `svg` icon in this project, use the `i18n` multi-language comfortably, switch the application language (including the native components and the browser page), make network requests more convenient.
24+
- [v0.3.0](https://github.com/Pure-Peace/vue-cli-electron-template/releases/tag/0.3.0): Old version. But some dependencies were upgraded and minor refactoring was done.
25+
- [v1.0.0](https://github.com/Pure-Peace/vue-cli-electron-template/releases/tag/1.0.0): After refactoring. Clearer directory structure. Also fix the problem of tray setting icon under MacOS.
1926

20-
[Document](https://github.com/Pure-Peace/vue-cli-electron-template/wiki)
27+
### Detailed:
2128

22-
## 📘These:
23-
- 🍊Basic: `vue-cli` &` electron-builder`
24-
- 🌕Router: `vue-router`
25-
- 🍁Multilingual: `vue-i18n`
26-
- 🌝Network Requester: `axios`
27-
- 🚅Quick package: `electron-builder`
28-
- 💚css preprocessor: `less`
29+
- Custom borderless windows.
30+
- Clear directory structure with modular design. Separation of main process (Electron) and rendering process (Vue), easy to extend and manage.
31+
- Fully support multiple languages and switch freely.
32+
- **svg** icon component, you can freely add and use svg icons, very easy
33+
- **Electron**: contains some demos.
34+
- **vue-i18n**:Added language switching demo, including language switching for **Electron** native components.
35+
- Wrapped **axios**, Api interface is separated from the requester for easy management.
36+
- Use **ESlint** for code style specification.
37+
- Added **vuex**, **vue-router**, and a handy global bus **bus**.
2938

30-
## 🔍And:
31-
- ⛅A custom window without native borders
32-
- 🎨Modular design with object-oriented writing (mainProcess)
33-
- 🍰Language switching for the entire program
34-
- 🐳An svg component based on `svg-sprite-loader`
35-
- 🏀`Electron 8`: Demo of some apis.
36-
- 🍉`vue-i18n`: Added demonstration of language switching, including language switching effect of `electron` native menu.
37-
- 🍩`axios`: Added request demo.
38-
- 🌼Use `ESlint` for code style specification.
39-
- 🌠and `vuex`, `vue-router`
40-
- 🍖I did not use any ui library, you can add as you like.
39+
**The project does not add any third-party ui libraries, so you can add as many as you like.**
40+
41+
## 📷 Screenshots:
4142

42-
## 📷Screenshots:
4343
![screenshot](http://otsu.fun/demos/0.png)
4444
![screenshot](http://otsu.fun/demos/1.png)
45-
![screenshot](http://otsu.fun/demos/gw.png)
45+
![screenshot](http://otsu.fun/demos/s1.png)
4646
![screenshot](http://otsu.fun/demos/2.png)
4747
![screenshot](http://otsu.fun/demos/3.png)
4848

49+
---
4950

50-
<h2 align="center">🏆-Start-</h2>
51+
## 🏆 Start
5152

52-
- `&` = `or`
53+
- Choose either **yarn** or **npm**
54+
55+
**🍬 Clone**
5356

54-
1. **🍬Clone this repository**
55-
5657
```bash
5758
git clone https://github.com/Pure-Peace/vue-cli-electron-template
5859
```
5960

60-
2. **🍮Enter the directory**
61-
6261
```bash
6362
cd vue-cli-electron-template
6463
```
6564

66-
3. **🍙Install dependencies (yarn is recommended)**
67-
65+
**🍙 Install**
66+
6867
```bash
69-
yarn & npm install
68+
yarn
7069
```
7170

72-
4. **🌽Start application**
73-
7471
```bash
75-
yarn go & npm run go
72+
npm install
7673
```
7774

78-
5. **🍭Packaging**
79-
75+
**🌽 Run**
76+
8077
```bash
81-
yarn packapp & npm run packapp
78+
yarn go
8279
```
8380

81+
```bash
82+
npm run go
83+
```
84+
85+
**🍭 Build**
86+
87+
```bash
88+
yarn buildapp
89+
```
90+
91+
```bash
92+
npm run buildapp
93+
```
8494

85-
<h2 align="center">🍌-Structure-</h2>
95+
### 🍌Structure:
8696

87-
**⚽files:**
97+
#### Important:
8898

89-
- 🎰`./vue.config.js`: Contains **vue path alias**,` electron-builder`, `i18n` and other related configurations.
90-
-`src/background.js`: **Main process** entry file.
91-
- 🐐`src/mainProcess/appManager.js`: Management of the **main process**.
92-
- 🚧`src/main.js`: Vue entry file.
93-
- 🏨`src/backend.js`: network request interface and` axios` configuration.
99+
- 🐓`src/main`:Main process (Electron).
100+
- 🙀`src/renderer`:Renderer process (Vue).
101+
- 🎰`vue.config.js`: Includes **Path alias****electron-builder****i18n** And app configurations.
94102

95-
**🍀Directories:**
103+
#### Others:
96104

97-
- 🌲`src/locales`: `i18n` language translation file directory.
98-
- 🐓`src/mainProcess`: Main process modular file directory.
99-
- 🙀`src/mainProcess/events`: ipc and app event manager.
100-
- 🌴`src/mainProcess/menus`: Menu manager.
101-
- 🐏`src/mainProcess/plugins`: Currently only translator.
102-
- 🙉`src/mainProcess/windows`: windows and windows manager.
105+
- 🏨`src/backend`: Api backend, and **axios** configurations.
106+
- 🌲`src/locales`**i18n** Translation file directory.
107+
- 🙀`src/main/events`:Main process (Electron) **ipc** and **app** events.
103108

104109
---
105-
## 🌹Thanks
106110

111+
### 🌹 Special thanks:
107112

108113
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
109114
<!-- prettier-ignore -->
@@ -112,4 +117,4 @@ yarn packapp & npm run packapp
112117

113118
<!-- ALL-CONTRIBUTORS-LIST:END -->
114119

115-
🌺Welcome your suggestions.
120+
Welcome issues

README_ZH.md

Lines changed: 58 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
![bigLogo](http://otsu.fun/big_logo.png)
2+
23
# 🔥vue-cli-electron-template
3-
⭐使用`vue-cli 3``Electron 8`构建的模块化的桌面应用程序模板。可以方便进行的打包、切换程序语言,使用自定义无边框窗口,并且添加了`vue-router``vue-i18n``axios``electron-builder`等常用插件以及一些演示功能。
44

55
![npm](https://img.shields.io/npm/v/@vue/cli?color=aa&label=vue-cli)
66
![GitHub package.json version](https://img.shields.io/github/package-json/v/Pure-Peace/vue-cli-electron-template?color=yellow&logo=yellow&logoColor=yellow)
@@ -10,102 +10,103 @@
1010
![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/Pure-Peace/vue-cli-electron-template?color=aa&label=Lightweight&logo=aa&logoColor=aa)
1111
![GitHub last commit](https://img.shields.io/github/last-commit/Pure-Peace/vue-cli-electron-template)
1212

13+
⭐ 使用 **vue-cli 4****Electron 8.x** 构建的模块化的桌面应用程序模板。目录结构清晰,主进程(Electron)与渲染进程(Vue)分离,易于扩展和管理。
14+
15+
支持快速打包、一键多语言切换。使用自定义无边框窗口,已添加易用的**svg**图标插件,封装了**axios** (Api 接口资源与请求器分离)、**vuex****vue-router****vue-i18n** 和 全局总线 **bus**,开箱即用,项目极速启动。
1316

14-
- 🌺[English](https://github.com/Pure-Peace/vue-cli-electron-template/blob/master/README.md) / 💖中文
17+
- [English](https://github.com/Pure-Peace/vue-cli-electron-template/blob/master/README.md) / 💖 中文
18+
- [简要文档](https://github.com/Pure-Peace/vue-cli-electron-template/wiki)
1519

16-
<h2 align="center">⚡-介绍!-</h2>
20+
## Release Notes:
1721

18-
🚀轻量、模块化的模板。添加了常用插件及演示功能,你可以在本项目中愉快的使用`svg`图片,舒适的享受`i18n`多国语言支持,切换程序语言(包括原生组件及浏览器页面),并且具有一个方便快捷的网络请求方式。
22+
- [v0.3.0](https://github.com/Pure-Peace/vue-cli-electron-template/releases/tag/0.3.0): 老版本。不过升级了一些依赖,进行了微小的重构。
23+
- [v1.0.0](https://github.com/Pure-Peace/vue-cli-electron-template/releases/tag/1.0.0): 整体重构,目录结构更加清晰。同时修复 MacOS 下托盘设置图标的问题。
1924

20-
[Document文档](https://github.com/Pure-Peace/vue-cli-electron-template/wiki)
25+
### 详细说明:
2126

22-
## 📘这些:
23-
- 🍊基础: `vue-cli` &` electron-builder`
24-
- 🌕路由: `vue-router`
25-
- 🍁多语言: `vue-i18n`
26-
- 🌝网络请求器: `axios`
27-
- 🚅快速打包: `electron-builder`
28-
- 💚css预处理器: `less`
27+
- 使用自定义的无边框窗口。
28+
- 清晰的目录结构,模块化设计。主进程(Electron)和渲染进程(Vue)分离,方便扩展和管理。
29+
- 完全支持多语言,切换自如。
30+
- 已编写**svg**图标组件,您可自由添加和使用 svg 图标,非常简单。
31+
- **Electron**:包含一些 api 使用演示。
32+
- **vue-i18n**:添加了语言切换效果演示,包括对`electron`原生组件的语言切换效果。
33+
- 已封装的**axios**,Api 接口与请求器分离,方便管理。
34+
- 使用**ESlint**进行代码风格规范。
35+
- 已添加**vuex****vue-router**,还有一个方便的全局总线**bus**
2936

30-
## 🔍以及:
31-
- ⛅自定义的原生无边框窗口
32-
- 🎨主进程可进行模块化管理
33-
- 🍰整个程序都可以进行方便的语言切换
34-
- 🐳一个方便你使用`svg`图片的组件(基于`svg-sprite-loader`插件)
35-
- 🏀`Electron 8`:添加了一些api演示
36-
- 🍉`vue-i18n`:添加了语言切换演示,包括`electron`原生菜单
37-
- 🍩`axios`:添加了网络请求演示
38-
- 🌼使用`ESlint`进行代码风格规范
39-
- 🌠还有`vuex``vue-router`
40-
- 🍖我没有在项目中添加第三方ui库,您可以随心所欲选择自己喜欢的添加
37+
**项目未添加任何第三方 ui 库,您可以随心所欲选择自己喜欢的添加。**
4138

39+
## 📷 演示截图:
4240

43-
## 📷Screenshots:
4441
![screenshot](http://otsu.fun/demos/0.png)
4542
![screenshot](http://otsu.fun/demos/1.png)
46-
![screenshot](http://otsu.fun/demos/gw.png)
43+
![screenshot](http://otsu.fun/demos/s1.png)
4744
![screenshot](http://otsu.fun/demos/2.png)
4845
![screenshot](http://otsu.fun/demos/3.png)
4946

47+
---
5048

51-
<h2 align="center">🏆-开始吧!-</h2>
49+
## 🏆 开始
5250

51+
- 任选 **yarn****npm** 其一
5352

54-
1. **🍬克隆这个仓库**
53+
**🍬 克隆项目**
5554

56-
- `&` = ``
57-
5855
```bash
5956
git clone https://github.com/Pure-Peace/vue-cli-electron-template
6057
```
6158

62-
2. **🍮进入目录**
63-
6459
```bash
6560
cd vue-cli-electron-template
6661
```
6762

68-
3. **🍙安装依赖(推荐使用yarn)**
69-
63+
**🍙 安装依赖**
64+
7065
```bash
71-
yarn 或 npm install
72-
````
66+
yarn
67+
```
7368

74-
4. **🌽启动应用**
75-
7669
```bash
77-
yarn go 或 npm run go
70+
npm install
7871
```
7972

80-
5. **🍭打包应用**
81-
73+
**🌽 启动应用**
74+
8275
```bash
83-
yarn packapp 或 npm run packapp
76+
yarn go
8477
```
8578

79+
```bash
80+
npm run go
81+
```
82+
83+
**🍭 打包应用**
84+
85+
```bash
86+
yarn buildapp
87+
```
88+
89+
```bash
90+
npm run buildapp
91+
```
8692

87-
<h2 align="center">🍌-结构!-</h2>
93+
### 🍌 目录结构
8894

89-
**⚽文件的:**
95+
#### 重要:
9096

91-
- 🎰`./vue.config.js`: 包括 **vue路径别名**` electron-builder``i18n` 等其它配配置项
92-
- ☔`src/background.js`: **主进程**入口文件
93-
- 🐐`src/mainProcess/appManager.js`: 负责管理**主进程**
94-
- 🚧`src/main.js`: Vue入口文件
95-
- 🏨`src/backend.js`: 网络请求接口及`axios`配置项
97+
- 🐓`src/main`:主进程(Electron 相关)。
98+
- 🙀`src/renderer`:渲染进程(Vue 或网页相关)。
99+
- 🎰`vue.config.js`: 包括**路径别名****electron-builder****i18n** 等各种 app 配置项。
96100

97-
**🍀目录的:**
101+
#### 其它:
98102

99-
- 🌲`src/locales``i18n`多语言翻译文件目录
100-
- 🐓`src/mainProcess`:主进程模块化文件
101-
- 🙀`src/mainProcess/events`:ipc及app事件
102-
- 🌴`src/mainProcess/menus`:菜单管理
103-
- 🐏`src/mainProcess/plugins`:目前只有翻译器在里面
104-
- 🙉`src/mainProcess/windows`:多窗口及窗口管理器
103+
- 🏨`src/backend`: Api 后端接口资源,及**axios**配置项。
104+
- 🌲`src/locales`**i18n** 多语言翻译文件目录。
105+
- 🙀`src/main/events`:主进程(Electron) **ipc****app** 事件。
105106

106107
---
107-
## 🌹特别感谢
108108

109+
### 🌹 特别感谢
109110

110111
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
111112
<!-- prettier-ignore -->
@@ -114,4 +115,4 @@ yarn packapp 或 npm run packapp
114115

115116
<!-- ALL-CONTRIBUTORS-LIST:END -->
116117

117-
🌺欢迎您提出建议
118+
🌺 欢迎您提出建议

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"name": "vue-cli-electron-template",
3-
"version": "0.3.0",
3+
"version": "1.0.0",
44
"private": true,
55
"scripts": {
66
"serve": "vue-cli-service serve",
77
"build": "vue-cli-service build",
88
"lint": "vue-cli-service lint",
99
"go": "vue-cli-service electron:serve",
10-
"packapp": "vue-cli-service electron:build",
10+
"buildapp": "vue-cli-service electron:build",
1111
"postinstall": "electron-builder install-app-deps",
1212
"postuninstall": "electron-builder install-app-deps"
1313
},
@@ -40,7 +40,7 @@
4040
"less-loader": "^5.0.0",
4141
"less": "^4.1.1",
4242
"vue-cli-plugin-axios": "~0.0.4",
43-
"vue-cli-plugin-electron-builder": "~1.4.6",
43+
"vue-cli-plugin-electron-builder": "^2.0.0-rc.6",
4444
"vue-cli-plugin-i18n": "~1.0.1",
4545
"vue-template-compiler": "^2.6.12"
4646
},

src/backend/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
import resources from './resources'
2+
/* Add Api interface in resources
3+
在resources中添加Api接口 */
24

35
export default resources

src/background.js

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

src/components/svgIcon/index.js

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

0 commit comments

Comments
 (0)