Giter Club home page Giter Club logo

umi-electron-template's Introduction

Umi Electron Template

semantic-release

一个基于 umiumi-plugin-electron-builder 的开发模板

预览

特性

架构

内置功能

  • 样式框架: 集成 antd-style
  • 数据持久化: 集成 sqlite3 作为本地数据库, TypeORM 作为 ORM;
  • 签名公证: 集成 macOS App 签名与公证,包含在 CI/CD 流程中;

开发体验

快速上手

安装

通过 git 下载这个仓库到本地

然后通过 yarn 下载安装依赖

yarn

开发

通过以下命令启动渲染进程(默认端口:7777)

yarn start

构建

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

开发指南

详见 开发指南

License

MIT ® Arvin Xu

umi-electron-template's People

Contributors

arvinxx avatar dependabot[bot] avatar renovate-bot avatar semantic-release-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

umi-electron-template's Issues

运行报错

Error: Module parse failed: Unexpected token (12:18)
File was processed with these loaders:

  • ../../node_modules/_ts-loader@8.3.0@ts-loader/index.js
    You may need an additional loader to handle the result of these loaders.
    | const importAll = (r) => r.keys().map((k) => r(k).default);
    | export class App extends EventEmitter {
browserManager;

| /**
| * app 包含的服务能力

模版使用的os-name包不允许require语法,但是umi好像是用的require导入的

重现步骤:下载模板到本地,安装依赖后,yarn start 直接报错。

node版本:v14.18.1

报错日志:

Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /Users/lihuajie/Desktop/yxm/node_modules/os-name/index.js
  require() of ES modules is not supported.
  require() of /Users/lihuajie/Desktop/yxm/node_modules/os-name/index.js from /Users/lihuajie/Desktop/yxm/src/renderer/.umi/electron/main.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
  Instead rename index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /Users/lihuajie/Desktop/yxm/node_modules/os-name/package.json.
  
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:1169:13)
      at Module.load (internal/modules/cjs/loader.js:992:32)
      at Module._load (internal/modules/cjs/loader.js:885:14)
      at Function.f._load (electron/js2c/asar_bundle.js:5:12633)
      at Module.require (internal/modules/cjs/loader.js:1032:19)
      at require (internal/modules/cjs/helpers.js:72:18)
      at Object.os-name (/Users/lihuajie/Desktop/yxm/src/renderer/.umi/electron/main.js:31785:18)
      at __webpack_require__ (/Users/lihuajie/Desktop/yxm/src/renderer/.umi/electron/main.js:21:30)
      at Object../core/Logger/index.ts (/Users/lihuajie/Desktop/yxm/src/renderer/.umi/electron/main.js:31219:48)
      at __webpack_require__ (/Users/lihuajie/Desktop/yxm/src/renderer/.umi/electron/main.js:21:30)

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update actions/download-artifact action to v3
  • chore(deps): update actions/setup-node action to v3
  • chore(deps): update actions/upload-artifact action to v3
  • chore(deps): update dependency @ant-design/pro-layout to v7
  • chore(deps): update dependency @testing-library/react to v13
  • chore(deps): update dependency @types/node to v18
  • chore(deps): update dependency @types/react to v18
  • chore(deps): update dependency @types/react-dom to v18
  • chore(deps): update dependency @types/react-test-renderer to v18
  • chore(deps): update dependency @umijs/fabric to v3
  • chore(deps): update dependency @umijs/preset-react to v2
  • chore(deps): update dependency @umijs/test to v4
  • chore(deps): update dependency antd to v5
  • chore(deps): update dependency concurrently to v7
  • chore(deps): update dependency dotenv to v16
  • chore(deps): update dependency electron-builder to v23
  • chore(deps): update dependency eslint to v8
  • chore(deps): update dependency husky to v8
  • chore(deps): update dependency lint-staged to v13
  • chore(deps): update dependency sinon to v14
  • chore(deps): update dependency umi to v4
  • chore(deps): update dependency umi-plugin-tailwindcss to v4
  • chore(deps): update jest monorepo to v29 (major) (@types/jest, jest, ts-jest)
  • chore(deps): update react monorepo to v18 (major) (react, react-dom)
  • fix(deps): update dependency electron-updater to v5
  • 🔐 Create all rate-limited PRs at once 🔐

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/auto-merge.yml
  • actions/checkout v2
  • actions/setup-node v2.1.2
  • c-hive/gha-yarn-cache v1
  • ahmadnassri/action-dependabot-auto-merge v2
.github/workflows/release.yml
  • actions/checkout v2
  • c-hive/gha-yarn-cache v1
  • actions/checkout v2
  • cycjimmy/semantic-release-action v2
  • actions/checkout v2
  • c-hive/gha-yarn-cache v1
  • actions/upload-artifact v2
  • actions/download-artifact v2
  • actions/checkout v2
  • actions/download-artifact v2
  • cycjimmy/semantic-release-action v2
.github/workflows/test.yml
  • actions/checkout v2
  • actions/setup-node v2.1.2
  • c-hive/gha-yarn-cache v1
npm
package.json
  • @arvinxu/macos-traffic-light ^3.0.0
  • electron-updater ^4.6.5
  • log4js ^6.4.1
  • os-name ^5.0.1
  • reflect-metadata ^0.1.13
  • robotjs ^0.6.0
  • source-map-support ^0.5.21
  • sqlite3 5.0.0
  • typeorm ^0.2.43
  • @ant-design/icons ^4.7.0
  • @ant-design/pro-layout ^6.33.0
  • @commitlint/cli ^12.1.4
  • @jest-runner/electron ^3.0.1
  • @testing-library/react ^12.1.3
  • @types/classnames ^2.3.1
  • @types/diff ^5.0.2
  • @types/jest ^27.4.1
  • @types/js-yaml ^4.0.5
  • @types/node ^12.0.12
  • @types/react ^17.0.39
  • @types/react-dom ^17.0.11
  • @types/react-test-renderer ^17.0.1
  • @types/sinon ^10.0.11
  • @umijs/fabric ^2.10.1
  • @umijs/preset-react ^1.8.30
  • @umijs/test ^3.5.20
  • ahooks ^2.10.14
  • antd ^4.18.8
  • awesome-typescript-loader ^5.2.1
  • classnames ^2.2.6
  • commitlint-config-gitmoji ^2.2.5
  • concurrently ^6.5.1
  • cross-env ^7.0.3
  • devtron ^1.4.0
  • diff ^5.0.0
  • dotenv ^10.0.0
  • electron ^11.3.0
  • electron-builder ^22.14.13
  • electron-builder-notarize ^1.4.0
  • electron-debug ^3.2.0
  • electron-devtools-installer ^3.2.0
  • electron-is ^3.0.0
  • electron-webpack ^2.8.2
  • electron-webpack-ts ^4.0.1
  • eslint ^7.32.0
  • husky ^4.3.8
  • jest ^26.6.3
  • jest-sinon ^1.0.4
  • js-yaml ^4.1.0
  • less-vars-to-js ^1.3.0
  • lint-staged ^10.5.3
  • prettier ^2.5.1
  • react 17.x
  • react-devtools ^4.23.0
  • react-dom 17.x
  • semantic-release ^18.0.1
  • semantic-release-config-gitmoji ^1.2.4
  • sinon ^9.0.0
  • ts-jest ^26.5.6
  • ts-node ^10.5.0
  • typescript ^4.5.5
  • umi ^3.5.20
  • umi-plugin-electron-builder ^2.1.17
  • umi-plugin-tailwindcss ^3.2.1

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.