From e5a39dc52ba6a8dcafbfac0bed030eecced5149b Mon Sep 17 00:00:00 2001 From: Nils Kolvenbach Date: Sat, 3 Feb 2024 18:30:50 +0100 Subject: [PATCH] Set NODE_ENV to production for build and release scripts --- package.json | 5 +++-- yarn.lock | 7 +++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 54982994..8dcdfa73 100644 --- a/package.json +++ b/package.json @@ -19,8 +19,8 @@ "lint": "eslint --ext .ts,.tsx .", "dev": "electron-forge start", "package": "electron-forge package", - "build": "electron-forge make", - "release": "electron-forge publish" + "build": "cross-env NODE_ENV=production electron-forge make", + "release": "cross-env NODE_ENV=production electron-forge publish" }, "dependencies": { "@elek-io/core": "^0.1.0", @@ -39,6 +39,7 @@ "@electron-forge/publisher-github": "^7.2.0", "@typescript-eslint/eslint-plugin": "^5.0.0", "@typescript-eslint/parser": "^5.0.0", + "cross-env": "^7.0.3", "electron": "^28.2.1", "electron-devtools-installer": "^3.2.0", "eslint": "^8.0.1", diff --git a/yarn.lock b/yarn.lock index a425a5d7..4eb7c04c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1897,6 +1897,13 @@ create-require@^1.1.0: resolved "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz" integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== +cross-env@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.3.tgz#865264b29677dc015ba8418918965dd232fc54cf" + integrity sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw== + dependencies: + cross-spawn "^7.0.1" + cross-spawn-windows-exe@^1.1.0, cross-spawn-windows-exe@^1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/cross-spawn-windows-exe/-/cross-spawn-windows-exe-1.2.0.tgz"