From 64ffd7676206301733e27310a71d2496db9be00a Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Fri, 15 May 2020 18:13:18 +0100 Subject: [PATCH] electron script --- packages/server/package.json | 2 +- packages/server/src/electron.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index c0c8027b36..86a9858032 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -30,7 +30,7 @@ "budi": "node ../cli/bin/budi", "dev:builder": "nodemon ../cli/bin/budi run", "electron": "electron src/electron.js", - "build:electron": "electron-builder", + "build:electron": "electron-builder --dir", "publish:electron": "electron-builder -mwl --publish always", "postinstall": "electron-builder install-app-deps", "lint": "eslint --fix src/" diff --git a/packages/server/src/electron.js b/packages/server/src/electron.js index cc06ceeca8..964c29eb4c 100644 --- a/packages/server/src/electron.js +++ b/packages/server/src/electron.js @@ -11,11 +11,14 @@ require("dotenv").config({ path: join(homedir(), ".budibase", ".env") }); const APP_URL = "http://localhost:4001/_builder"; const APP_TITLE = "Budibase Builder"; +let win; + function createWindow() { app.server = require("./app"); - let win = new BrowserWindow({ width: 1920, height: 1080 }); + win = new BrowserWindow({ width: 1920, height: 1080 }); win.setTitle(APP_TITLE); win.loadURL(APP_URL); + win.showInactive(); if (isDev) { win.webContents.openDevTools(); } else {