electron script
This commit is contained in:
parent
34c8b1faf5
commit
64ffd76762
|
@ -30,7 +30,7 @@
|
||||||
"budi": "node ../cli/bin/budi",
|
"budi": "node ../cli/bin/budi",
|
||||||
"dev:builder": "nodemon ../cli/bin/budi run",
|
"dev:builder": "nodemon ../cli/bin/budi run",
|
||||||
"electron": "electron src/electron.js",
|
"electron": "electron src/electron.js",
|
||||||
"build:electron": "electron-builder",
|
"build:electron": "electron-builder --dir",
|
||||||
"publish:electron": "electron-builder -mwl --publish always",
|
"publish:electron": "electron-builder -mwl --publish always",
|
||||||
"postinstall": "electron-builder install-app-deps",
|
"postinstall": "electron-builder install-app-deps",
|
||||||
"lint": "eslint --fix src/"
|
"lint": "eslint --fix src/"
|
||||||
|
|
|
@ -11,11 +11,14 @@ require("dotenv").config({ path: join(homedir(), ".budibase", ".env") });
|
||||||
const APP_URL = "http://localhost:4001/_builder";
|
const APP_URL = "http://localhost:4001/_builder";
|
||||||
const APP_TITLE = "Budibase Builder";
|
const APP_TITLE = "Budibase Builder";
|
||||||
|
|
||||||
|
let win;
|
||||||
|
|
||||||
function createWindow() {
|
function createWindow() {
|
||||||
app.server = require("./app");
|
app.server = require("./app");
|
||||||
let win = new BrowserWindow({ width: 1920, height: 1080 });
|
win = new BrowserWindow({ width: 1920, height: 1080 });
|
||||||
win.setTitle(APP_TITLE);
|
win.setTitle(APP_TITLE);
|
||||||
win.loadURL(APP_URL);
|
win.loadURL(APP_URL);
|
||||||
|
win.showInactive();
|
||||||
if (isDev) {
|
if (isDev) {
|
||||||
win.webContents.openDevTools();
|
win.webContents.openDevTools();
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue