Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/build-electron-mac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: build-electron-mac

on:
push:
branches: ["main", "develop"]
pull_request:
branches: ["main"]

jobs:
build:
runs-on: macos-latest

strategy:
matrix:
node-version: [18.x, 20.x, 21.x, 22.x, 23.x, 24.x]

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- uses: pnpm/action-setup@v3
with:
version: 8

- name: Build with-electron
working-directory: ./demos/with-electron
run: |
pnpm install --no-frozen-lockfile
pnpm run build
30 changes: 30 additions & 0 deletions .github/workflows/build-electron.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: build-electron

on:
push:
branches: ["main", "develop"]
pull_request:
branches: ["main"]

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest] #

steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22

- name: Build with-electron
working-directory: ./demos/with-electron
run: |
yarn install --no-frozen-lockfile
yarn run build
1 change: 0 additions & 1 deletion .github/workflows/build-nextjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,3 @@ jobs:
pnpm install --no-frozen-lockfile
pnpm run build


1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ build/
npm-debug.log*
npm-error.log*
yarn-debug.log*
demos/with-electron/release


2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ alpha(功能测试)、beta(集成测试)为我们的非正式版本,

> 如果使用 next.js,可参考 demos => [with-next](https://github.com/Ezviz-OpenBiz/EZUIKit-JavaScript-npm/tree/master/demos/with-next)

> 如果使用 electron,可参考 demos => [with-electron](https://github.com/Ezviz-OpenBiz/EZUIKit-JavaScript-npm/tree/master/demos/with-electron)

> 如果使用 vue3,可参考 demos => [vue3-demo](https://github.com/Ezviz-OpenBiz/EZUIKit-JavaScript-npm/tree/master/demos/vue3-demo)

> 如果使用 vue2.7,可参考 demos => [vue-demo](https://github.com/Ezviz-OpenBiz/EZUIKit-JavaScript-npm/tree/master/demos/vue-demo)
Expand Down
33 changes: 33 additions & 0 deletions demos/with-electron/electron-builder.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

/**
* @see https://www.electron.build/configuration/configuration
*/
{
appId: 'com.ezuikit.app',
asar: true,
directories: {
output: 'release/${version}',
},
files: ['src'],
mac: {
artifactName: '${productName}_${version}.${ext}',
target: ['dmg', 'zip'],
},
win: {
target: [
{
target: 'nsis',
arch: ['x64'],
},
],
artifactName: '${productName}_${version}.${ext}',
},
nsis: {
oneClick: false,
perMachine: false,
allowToChangeInstallationDirectory: true,
deleteAppDataOnUninstall: true,
installerIcon: 'resource/icon.ico',
installerHeaderIcon: 'resource/icon.ico',
}
}
18 changes: 18 additions & 0 deletions demos/with-electron/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "with-electron",
"version": "1.0.0",
"description": "",
"main": "src/main.js",
"scripts": {
"dev": "npx electron .",
"build": "electron-builder"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {},
"devDependencies": {
"electron": "^36.3.2",
"electron-builder": "^26.0.12"
}
}
Loading