electron script

This commit is contained in:
Martin McKeaveney 2020-05-15 18:13:18 +01:00
parent 34c8b1faf5
commit 64ffd76762
2 changed files with 5 additions and 2 deletions

View File

@ -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/"

View File

@ -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 {