Skip to content

Commit a296b08

Browse files
committed
fix: build failed
1 parent b1ae040 commit a296b08

File tree

5 files changed

+14
-15
lines changed

5 files changed

+14
-15
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ jobs:
4646
- name: Install dependencies
4747
run: npm install --force
4848

49-
- name: Build Package
50-
run: npm run build
49+
- name: tsc
50+
continue-on-error: true
51+
run: npm run tsc
5152

5253
- name: Compile artifacts and upload them to github release
5354
uses: nick-fields/retry@v2
@@ -57,7 +58,6 @@ jobs:
5758
retry_wait_seconds: 15
5859
retry_on: error
5960
shell: 'bash'
60-
command: electron-builder build --config .electron-builder.config.js --publish always
61+
command: npm run build:main -- --publish always
6162
env:
6263
GH_TOKEN: ${{ secrets.GH_TOKEN }}
63-

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22

33
---
44

5-
[![CI][CI-image]][CI-url]
6-
7-
[CI-image]: https://github.com/electron-modules/electron-modules-sample/actions/workflows/ci.yml/badge.svg
8-
[CI-url]: https://github.com/electron-modules/electron-modules-sample/actions/workflows/ci.yml
5+
[![CI](https://github.com/electron-modules/electron-modules-sample/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/electron-modules/electron-modules-sample/actions/workflows/ci.yml)
6+
[![Release](https://github.com/electron-modules/electron-modules-sample/actions/workflows/release.yml/badge.svg?branch=main)](https://github.com/electron-modules/electron-modules-sample/actions/workflows/release.yml)
97

108
The All-In-One sample for https://github.com/electron-modules
119

assets/icon.png

56.6 KB
Loading

package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "electron-modules-sample",
3-
"version": "0.1.2",
3+
"version": "0.1.5",
44
"private": true,
55
"description": "electron modules sample",
66
"keywords": [
@@ -10,11 +10,12 @@
1010
"type": "git",
1111
"url": "git://github.com/electron-modules/electron-modules-sample.git"
1212
},
13-
"main": "./src/main.ts",
13+
"main": "./src/main.js",
1414
"dependencies": {
1515
"@electron/remote": "2",
1616
"debug": "^4.3.4",
1717
"detect-port": "1",
18+
"easy-i18n-cli": "1",
1819
"electrom": "19",
1920
"electron-json-storage-alt": "18",
2021
"electron-webview-schedule": "18",
@@ -40,7 +41,6 @@
4041
"@types/node": "^18.15.11",
4142
"cross-env": "^7.0.3",
4243
"dexie": "^3.2.3",
43-
"easy-i18n-cli": "1",
4444
"electron": "19",
4545
"electron-builder": "^24.6.4",
4646
"electron-installer-dmg": "^4.0.0",
@@ -66,7 +66,9 @@
6666
"dev:watch": "gulp dev-app --watch",
6767
"test": "nyc --reporter=lcov --reporter=text mocha",
6868
"lint": "eslint . --fix",
69-
"build": "electron-builder build --config .electron-builder.config.js",
69+
"tsc": "tsc -p tsconfig.json",
70+
"build": "npm run tsc && npm run build:main",
71+
"build:main": "electron-builder build --config .electron-builder.config.js",
7072
"reset:db": "sh ./scripts/clean-db.sh",
7173
"translate": "easy-i18n-cli -c ./i18n.config.js",
7274
"translate:check": "npm run translate -- --check",

tsconfig.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,9 @@
2222
"allowSyntheticDefaultImports": true,
2323
"useUnknownInCatchVariables": false,
2424
"resolveJsonModule": true,
25-
"allowJs": true,
26-
"skipLibCheck": true,
27-
"outDir": "lib"
25+
"skipLibCheck": true
2826
},
27+
"outDir": "./",
2928
"include": [
3029
"src/**/*",
3130
],

0 commit comments

Comments
 (0)