mirror of
https://github.com/frappe/books.git
synced 2024-12-23 03:19:01 +00:00
Updated frappejs packages to work with node to v12
This commit is contained in:
parent
a91b4a274c
commit
5032f0397c
9879
package-lock.json
generated
9879
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -20,7 +20,8 @@
|
|||||||
"dist/electron"
|
"dist/electron"
|
||||||
],
|
],
|
||||||
"dmg": {
|
"dmg": {
|
||||||
"contents": [{
|
"contents": [
|
||||||
|
{
|
||||||
"x": 410,
|
"x": 410,
|
||||||
"y": 150,
|
"y": 150,
|
||||||
"type": "link",
|
"type": "link",
|
||||||
@ -58,7 +59,8 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"cross-env": "^5.2.0",
|
"cross-env": "^5.2.0",
|
||||||
"frappejs": "github:frappe/frappejs",
|
"file-saver": "^2.0.2",
|
||||||
|
"frappejs": "github:thefalconx33/frappejs#test",
|
||||||
"nodemailer": "^4.7.0",
|
"nodemailer": "^4.7.0",
|
||||||
"popper.js": "^1.14.4",
|
"popper.js": "^1.14.4",
|
||||||
"vue-color": "^2.7.0",
|
"vue-color": "^2.7.0",
|
||||||
|
@ -1,20 +1,17 @@
|
|||||||
const {
|
const { app, BrowserWindow } = require('electron');
|
||||||
app,
|
|
||||||
BrowserWindow
|
|
||||||
} = require('electron');
|
|
||||||
const setupMenu = require('./menu');
|
const setupMenu = require('./menu');
|
||||||
|
|
||||||
let mainWindow
|
let mainWindow;
|
||||||
let winURL
|
let winURL;
|
||||||
|
|
||||||
if (process.env.NODE_ENV !== 'development') {
|
if (process.env.NODE_ENV !== 'development') {
|
||||||
global.__static = require('path').join(__dirname, '/static').replace(/\\/g, '\\\\')
|
global.__static = require('path')
|
||||||
|
.join(__dirname, '/static')
|
||||||
|
.replace(/\\/g, '\\\\');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
const {
|
const { getAppConfig } = require('frappejs/webpack/utils');
|
||||||
getAppConfig
|
|
||||||
} = require('frappejs/webpack/utils');
|
|
||||||
const appConfig = getAppConfig();
|
const appConfig = getAppConfig();
|
||||||
winURL = `http://localhost:${appConfig.dev.devServerPort}`;
|
winURL = `http://localhost:${appConfig.dev.devServerPort}`;
|
||||||
} else {
|
} else {
|
||||||
@ -31,32 +28,33 @@ function createWindow() {
|
|||||||
height: 768,
|
height: 768,
|
||||||
useContentSize: true,
|
useContentSize: true,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
webSecurity: false
|
webSecurity: false,
|
||||||
|
nodeIntegration: true
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
|
||||||
mainWindow.loadURL(winURL)
|
mainWindow.loadURL(winURL);
|
||||||
|
|
||||||
mainWindow.on('closed', () => {
|
mainWindow.on('closed', () => {
|
||||||
mainWindow = null
|
mainWindow = null;
|
||||||
})
|
});
|
||||||
|
|
||||||
setupMenu();
|
setupMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
app.on('ready', createWindow)
|
app.on('ready', createWindow);
|
||||||
|
|
||||||
app.on('window-all-closed', () => {
|
app.on('window-all-closed', () => {
|
||||||
if (process.platform !== 'darwin') {
|
if (process.platform !== 'darwin') {
|
||||||
app.quit()
|
app.quit();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
|
||||||
app.on('activate', () => {
|
app.on('activate', () => {
|
||||||
if (mainWindow === null) {
|
if (mainWindow === null) {
|
||||||
createWindow()
|
createWindow();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
|
||||||
// TODO:
|
// TODO:
|
||||||
// Enable Auto Update
|
// Enable Auto Update
|
||||||
|
Loading…
Reference in New Issue
Block a user