Skip to content

Commit 06eaf1e

Browse files
committed
demo: add electron demo
1 parent d2b1e6d commit 06eaf1e

36 files changed

+16224
-1
lines changed

.github/workflows/build-electron.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: build-nextjs
2+
3+
on:
4+
push:
5+
branches: ["main", "develop"]
6+
pull_request:
7+
branches: ["main"]
8+
9+
jobs:
10+
build:
11+
runs-on: windows-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [18.x, 20.x, 21.x, 22.x, 23.x, 24.x]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Use Node.js ${{ matrix.node-version }}
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: ${{ matrix.node-version }}
23+
- uses: pnpm/action-setup@v3
24+
with:
25+
version: 8
26+
27+
- name: Build with-electron
28+
working-directory: ./demos/with-electron
29+
run: |
30+
pnpm install --no-frozen-lockfile
31+
pnpm run build

.github/workflows/build-nextjs.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,3 @@ jobs:
3030
pnpm install --no-frozen-lockfile
3131
pnpm run build
3232
33-

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ alpha(功能测试)、beta(集成测试)为我们的非正式版本,
115115
116116
> 如果使用 next.js,可参考 demos => [with-next](https://github.com/Ezviz-OpenBiz/EZUIKit-JavaScript-npm/tree/master/demos/with-next)
117117
118+
> 如果使用 electron,可参考 demos => [with-electron](https://github.com/Ezviz-OpenBiz/EZUIKit-JavaScript-npm/tree/master/demos/with-electron)
119+
118120
> 如果使用 vue3,可参考 demos => [vue3-demo](https://github.com/Ezviz-OpenBiz/EZUIKit-JavaScript-npm/tree/master/demos/vue3-demo)
119121
120122
> 如果使用 vue2.7,可参考 demos => [vue-demo](https://github.com/Ezviz-OpenBiz/EZUIKit-JavaScript-npm/tree/master/demos/vue-demo)

demos/with-electron/package.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name": "with-electron",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "src/main.js",
6+
"scripts": {
7+
"dev": "npx electron .",
8+
"build": "electron-builder"
9+
},
10+
"keywords": [],
11+
"author": "",
12+
"license": "ISC",
13+
"dependencies": {
14+
},
15+
"devDependencies": {
16+
"electron": "^36.3.2",
17+
"electron-builder": "^26.0.12"
18+
},
19+
"build": {
20+
"appId": "com.ezuikit.app",
21+
"productName": "Ezuikit",
22+
"win": {
23+
"target": "nsis"
24+
},
25+
"mac": {
26+
"target": "dmg"
27+
}
28+
}
29+
}

0 commit comments

Comments
 (0)