⭐ Using vue-cli 4 and Electron 11.x built a modular desktop application template.
The directory structure is clear and the main process (electron) is separated from the rendering process (vue), which is easy to extend and manage.
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.
- English / 💖 中文
- Simple document
- v0.3.0: Old version. But some dependencies were upgraded and minor refactoring was done.
- v1.0.0: After refactoring. Clearer directory structure. Also fix the problem of tray setting icon under MacOS.
- v2.0.0: Electron 11.x version
- Custom borderless windows.
- Clear directory structure with modular design. Separation of main process (Electron) and rendering process (Vue), easy to extend and manage.
- Fully support multiple languages and switch freely.
- svg icon component, you can freely add and use svg icons, very easy
- Electron: contains some demos.
- vue-i18n:Added language switching demo, including language switching for Electron native components.
- Wrapped axios, Api interface is separated from the requester for easy management.
- Use ESlint for code style specification.
- Added vuex, vue-router, and a handy global bus bus.
The project does not add any third-party ui libraries, so you can add as many as you like.
- Choose either yarn or npm
🍬 Clone
git clone https://github.com/Pure-Peace/vue-cli-electron-template
cd vue-cli-electron-template
🍙 Install
yarn
npm install
🌽 Run
yarn go
npm run go
🍭 Build
yarn buildapp
npm run buildapp
- 🐓
src/main
:Main process (Electron). - 🙀
src/renderer
:Renderer process (Vue). - 🎰
vue.config.js
: Includes Path alias、electron-builder、i18n And app configurations.
- 🏨
src/backend
: Api backend, and axios configurations. - 🌲
src/locales
:i18n Translation file directory. - 🙀
src/main/events
:Main process (Electron) ipc and app events.
Hancel Lin |
---|
Welcome issues