From 792156f376ca4429970148e769f1c8fe13aa5757 Mon Sep 17 00:00:00 2001 From: Ronan Jouchet Date: Sat, 18 Jul 2020 01:47:46 -0400 Subject: [PATCH] Bump deps: electron-packager, ts-loader, types --- package.json | 8 ++++---- src/options/model.ts | 1 + src/options/optionsMain.ts | 7 +++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 6b71cdf..5fb2e2d 100644 --- a/package.json +++ b/package.json @@ -52,17 +52,17 @@ }, "dependencies": { "@types/cheerio": "0.x", - "@types/electron-packager": "14.x", + "@types/electron-packager": "15.x", "@types/lodash": "4.x", "@types/ncp": "2.x", - "@types/node": "8.x", + "@types/node": "10.x", "@types/page-icon": "0.x", "@types/shelljs": "0.x", "@types/tmp": "0.x", "axios": "0.x", "cheerio": "^1.0.0-rc.3", "commander": "4.x", - "electron-packager": "14.x", + "electron-packager": "15.x", "gitcloud": "0.x", "hasbin": "1.x", "lodash": "4.x", @@ -84,7 +84,7 @@ "jest": "26.x", "prettier": "2.x", "rimraf": "3.x", - "ts-loader": "7.x", + "ts-loader": "8.x", "typescript": "3.x", "webpack": "4.x", "webpack-cli": "3.x" diff --git a/src/options/model.ts b/src/options/model.ts index 4d3ea4e..ad0e5d9 100644 --- a/src/options/model.ts +++ b/src/options/model.ts @@ -2,6 +2,7 @@ import * as electronPackager from 'electron-packager'; export interface ElectronPackagerOptions extends electronPackager.Options { targetUrl: string; + platform: string; } export interface AppOptions { diff --git a/src/options/optionsMain.ts b/src/options/optionsMain.ts index 3987b9a..c5b43f0 100644 --- a/src/options/optionsMain.ts +++ b/src/options/optionsMain.ts @@ -135,13 +135,12 @@ export async function getOptions(rawOptions: any): Promise { options.nativefier.userAgent = null; } - if (options.packager.platform.toLowerCase() === 'windows') { + const platform = options.packager.platform.toLowerCase(); + if (platform === 'windows') { options.packager.platform = 'win32'; } - if ( - ['osx', 'mac', 'macos'].includes(options.packager.platform.toLowerCase()) - ) { + if (['osx', 'mac', 'macos'].includes(platform)) { options.packager.platform = 'darwin'; }