Skip to content

Commit

Permalink
Fixes scripts in Electron examples. (#36133)
Browse files Browse the repository at this point in the history
There were a few issues with the scripts in the Electron examples:

* `dist` and `pack-app` would fail without a `name` and `version` in `package.json`.
* `type-check` didn't work because there isn't a `tsconfig.json` at the root. It needs to look in the `electron-src` and `renderer` folders respectively.

`electron-builder` also needed to be updated in order to run on macOS 12.3+ (see electron-userland/electron-builder#6606). 

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`


Co-authored-by: Lee Robinson <9113740+leerob@users.noreply.github.com>
  • Loading branch information
manovotny and leerob committed Apr 14, 2022
1 parent 953cd9a commit be3c804
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/with-electron-typescript/package.json
Expand Up @@ -10,7 +10,7 @@
"build": "npm run build-renderer && npm run build-electron",
"pack-app": "npm run build && electron-builder --dir",
"dist": "npm run build && electron-builder",
"type-check": "tsc"
"type-check": "tsc -p ./renderer/tsconfig.json && tsc -p ./electron-src/tsconfig.json"
},
"dependencies": {
"electron-is-dev": "^1.1.0",
Expand All @@ -23,7 +23,7 @@
"@types/react": "^16.9.9",
"@types/react-dom": "^16.9.9",
"electron": "^13",
"electron-builder": "^22.9.1",
"electron-builder": "^23.0.3",
"next": "latest",
"rimraf": "^3.0.0",
"typescript": "^4.0.5"
Expand Down
2 changes: 1 addition & 1 deletion examples/with-electron/package.json
Expand Up @@ -18,7 +18,7 @@
},
"devDependencies": {
"electron": "^12.0.2",
"electron-builder": "^22.10.5",
"electron-builder": "^23.0.3",
"next": "latest",
"react": "^17.0.2",
"react-dom": "^17.0.2"
Expand Down

0 comments on commit be3c804

Please sign in to comment.