From 7cdf650f81c904c66d32c98844abca297191a943 Mon Sep 17 00:00:00 2001 From: RUNGUSZONE Date: Thu, 28 Dec 2023 19:27:33 -0700 Subject: [PATCH] electron forge --- .gitignore | 3 ++- frontend/forge.config.js | 31 +++++++++++++++++++++++++++++++ frontend/package.json | 17 ++++++++++++++--- 3 files changed, 47 insertions(+), 4 deletions(-) create mode 100644 frontend/forge.config.js diff --git a/.gitignore b/.gitignore index 5f36f47..70e3eb4 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,5 @@ internal.txt logs data saved-messages.jsonl -venv \ No newline at end of file +venv +out \ No newline at end of file diff --git a/frontend/forge.config.js b/frontend/forge.config.js new file mode 100644 index 0000000..27826f6 --- /dev/null +++ b/frontend/forge.config.js @@ -0,0 +1,31 @@ +module.exports = { + packagerConfig: { + asar: true, + icon: '/css/bucket.png' + }, + rebuildConfig: {}, + makers: [ + { + name: '@electron-forge/maker-squirrel', + config: {}, + }, + { + name: '@electron-forge/maker-zip', + platforms: ['darwin'], + }, + { + name: '@electron-forge/maker-deb', + config: {}, + }, + { + name: '@electron-forge/maker-rpm', + config: {}, + }, + ], + plugins: [ + { + name: '@electron-forge/plugin-auto-unpack-natives', + config: {}, + }, + ], +}; diff --git a/frontend/package.json b/frontend/package.json index 8cb09da..ceca759 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,7 +1,7 @@ { "dependencies": { "discord.js": "^14.14.1", - "electron": "^28.1.0", + "electron-squirrel-startup": "^1.0.0", "inquirer": "^9.2.12", "node-fetch": "^3.3.2", "openai": "^4.21.0" @@ -15,7 +15,9 @@ "url": "git+https://github.com/runguszone/Bucket.git" }, "scripts": { - "start": "electron ." + "start": "electron-forge start", + "package": "electron-forge package", + "make": "electron-forge make" }, "keywords": [ "bucket" @@ -25,5 +27,14 @@ "bugs": { "url": "https://github.com/runguszone/Bucket/issues" }, - "homepage": "https://github.com/runguszone/Bucket#readme" + "homepage": "https://github.com/runguszone/Bucket#readme", + "devDependencies": { + "@electron-forge/cli": "^7.2.0", + "@electron-forge/maker-deb": "^7.2.0", + "@electron-forge/maker-rpm": "^7.2.0", + "@electron-forge/maker-squirrel": "^7.2.0", + "@electron-forge/maker-zip": "^7.2.0", + "@electron-forge/plugin-auto-unpack-natives": "^7.2.0", + "electron": "^28.1.0" + } }