Upgrade electron

This commit is contained in:
Mohammad Fares
2019-11-20 20:16:06 +01:00
parent bd37883479
commit 36acb5d514
4 changed files with 1496 additions and 1435 deletions

2912
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -46,7 +46,7 @@
"chalk": "^2.4.1", "chalk": "^2.4.1",
"death": "^1.1.0", "death": "^1.1.0",
"deepmerge": "^2.1.0", "deepmerge": "^2.1.0",
"electron": "^2.0.8", "electron": "^7.1.2",
"flowa": "^4.0.2", "flowa": "^4.0.2",
"fs-extra": "^5.0.0", "fs-extra": "^5.0.0",
"gif-encoder": "^0.6.1", "gif-encoder": "^0.6.1",

View File

@@ -44,7 +44,10 @@ function createWindow() {
var win = new BrowserWindow({ var win = new BrowserWindow({
show: false, show: false,
width: 8000, width: 8000,
height: 8000 height: 8000,
webPreferences: {
nodeIntegration: true
}
}); });
// Load index.html // Load index.html

View File

@@ -116,7 +116,7 @@ function capture(frameIndex, callback) {
stepsCounter = (stepsCounter + 1) % step; stepsCounter = (stepsCounter + 1) % step;
capturePage(captureRect, function(img) { capturePage(captureRect).then((img) => {
var outputPath = path.join(renderDir, frameIndex + '.png'); var outputPath = path.join(renderDir, frameIndex + '.png');
@@ -124,6 +124,10 @@ function capture(frameIndex, callback) {
ipcRenderer.send('captured', frameIndex); ipcRenderer.send('captured', frameIndex);
callback(); callback();
}).catch((err) => {
throw new err;
}); });
} }