1
0
Fork 0
mirror of https://github.com/anyproto/anytype-ts.git synced 2025-06-08 05:57:02 +09:00

#12: dist build

This commit is contained in:
Andrew Simachev 2019-11-21 12:54:38 +03:00
parent 319b39db32
commit c127e2bcbe
9 changed files with 1212 additions and 80 deletions

View file

@ -1,7 +1,9 @@
const electron = require('electron');
const { app, BrowserWindow, ipcMain, shell } = require('electron');
const { is, appMenu } = require('electron-util');
const path = require('path');
const os = require('os');
const userDataPath = app.getPath('userData');
function createWindow () {
const { width, height } = electron.screen.getPrimaryDisplay().workAreaSize;
@ -27,12 +29,16 @@ function createWindow () {
);
*/
win.loadURL('http://localhost:8080');
//win.loadFile('dist/index.html');
win.toggleDevTools();
if (is.development) {
win.loadURL('http://localhost:8080');
win.toggleDevTools();
} else {
win.loadFile('dist/index.html');
};
ipcMain.on('appLoaded', () => {
console.log('appLoaded');
win.webContents.send('userDataPath', userDataPath);
});
ipcMain.on('appClose', () => {