read electron version from package.json

This commit is contained in:
ethernet 2026-08-14 02:02:08 -04:00
parent 37ff83f3d3
commit 0d0e9fe5c9
1 changed files with 5 additions and 1 deletions

View File

@ -37,9 +37,13 @@ const {
/** @typedef {import("app-builder-lib").Configuration} Configuration */
const electronVersion = require('./package.json').devDependencies.electron
if (!electronVersion.matches(/^\d+\.\d+\.\d+$/)) {
throw new Error(`invalid electron version ${electronVersion} in package.json`)
}
/** @type {Configuration} */
module.exports = {
electronVersion: '40.10.2',
electronVersion,
appId,
productName: displayName,
executableName: displayName,