https://github.com/arvinxx/umi-electron-template
Umi Electron Template
https://github.com/arvinxx/umi-electron-template
electron template typescript umi umi3 umijs
Last synced: 5 months ago
JSON representation
Umi Electron Template
- Host: GitHub
- URL: https://github.com/arvinxx/umi-electron-template
- Owner: arvinxx
- License: mit
- Created: 2019-05-05T11:27:46.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-09-03T21:48:17.000Z (about 1 year ago)
- Last Synced: 2025-04-01T17:58:01.117Z (8 months ago)
- Topics: electron, template, typescript, umi, umi3, umijs
- Language: TypeScript
- Homepage:
- Size: 4.34 MB
- Stars: 71
- Watchers: 1
- Forks: 14
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Umi Electron Template
![][version-url] [](https://github.com/semantic-release/semantic-release) ![][license-url]
[version-url]: https://img.shields.io/github/v/release/arvinxx/umi-electron-template
[license-url]: https://img.shields.io/github/license/arvinxx/umi-electron-template
一个基于 [umi][umi] 和 [umi-plugin-electron-builder][umi-plugin-electron-builder] 的开发模板

## 特性
### 架构
- 基于 [umi-plugin-electron-builder][umi-plugin-electron-builder] 构建,享受完整 [umi][umi] 开发生态;
- 采用 [electron-builder][electron-builder] 打包构建工具;
- 使用 Main 与 Renderer 双目录架构;
- 基于 [inversify][inversify] 实现 DI/IoC
### 内置功能
- **样式框架**: 集成 [antd-style][tailwindcss];
- **数据持久化**: 集成 [sqlite3][sqlite3] 作为本地数据库, [TypeORM][typeorm] 作为 ORM;
- **签名公证**: 集成 macOS App 签名与公证,包含在 CI/CD 流程中;
### 开发体验
- 集成 [react-devtools][react-devtools] 与 [Redux Dev Tools][redux-devtools];
- 基于 [Gitmoji Commit Workflow][gitmoji-commit-workflow], 实现自动化版本管理与发布;
[umi]: https://umijs.org/
[umi-plugin-electron-builder]: https://github.com/BySlin/umi-plugin-electron-builder
[react-devtools]: https://www.npmjs.com/package/react-devtools
[electron-builder]: https://www.electron.build/
[redux-devtools]: https://github.com/reduxjs/redux-devtools
[gitmoji-commit-workflow]: https://github.com/arvinxx/gitmoji-commit-workflow/
[tailwindcss]: https://antd-style.arvinx.app/
[sqlite3]: https://github.com/mapbox/node-sqlite3
[typeorm]: https://typeorm.io/#/
[inversify]: https://github.com/inversify/InversifyJS
## 快速上手
### 安装
通过 git 下载这个仓库到本地
然后通过 yarn 下载安装依赖
```bash
yarn
```
### 开发
通过以下命令启动渲染进程(默认端口:7777)
```bash
yarn start
```
### 构建
```bash
yarn build
```
构建文件会输出到 `release` 目录下:
```
release
├── builder-effective-config.yaml
├── bundled
│ ├── home.html
│ ├── index.html
│ ├── main.js
│ ├── main.js.map
│ ├── node_modules
│ ├── package.json
│ ├── static
│ ├── umi.css
│ └── umi.js
├── latest-mac.yml
├── mac
│ └── Umi Electron Template.app
├── umi-electron-template_setup_1.8.1.dmg
└── umi-electron-template_setup_1.8.1.dmg.blockmap
```
## 开发指南
详见 [开发指南](./docs/guide.md)
## License
[MIT](./LICENSE) ® Arvin Xu