diff --git a/docs/api.md b/docs/api.md index e4c913a..ea1cecc 100644 --- a/docs/api.md +++ b/docs/api.md @@ -64,6 +64,7 @@ - [[file-download-options]](#file-download-options) - [[always-on-top]](#always-on-top) - [[global-shortcuts]](#global-shortcuts) + - [[darwin-dark-mode-support]](#darwin-dark-mode-support) - [Programmatic API](#programmatic-api) - [Addition packaging options for Windows](#addition-packaging-options-for-windows) - [[version-string]](#version-string) @@ -694,6 +695,13 @@ Example `shortcuts.json` for `https://deezer.com` & `https://soundcloud.com` to ] ``` +#### [darwin-dark-mode-support] + +``` +--darwin-dark-mode-support +``` + +Enables Dark Mode support on macOS 10.4+. ## Programmatic API diff --git a/package.json b/package.json index 361e0f7..67b8fd2 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "babel-polyfill": "^6.26.0", "cheerio": "^1.0.0-rc.2", "commander": "^2.14.0", - "electron-packager": "^12.0.1", + "electron-packager": "^12.2.0", "gitcloud": "^0.1.0", "hasbin": "^1.2.3", "lodash": "^4.17.5", diff --git a/src/build/buildApp.js b/src/build/buildApp.js index ff82a5f..42db474 100644 --- a/src/build/buildApp.js +++ b/src/build/buildApp.js @@ -58,6 +58,7 @@ function selectAppArgs(options) { alwaysOnTop: options.alwaysOnTop, titleBarStyle: options.titleBarStyle, globalShortcuts: options.globalShortcuts, + darwinDarkModeSupport: options.darwinDarkModeSupport, }; } diff --git a/src/cli.js b/src/cli.js index 521739b..80ccbf4 100755 --- a/src/cli.js +++ b/src/cli.js @@ -238,6 +238,10 @@ if (require.main === module) { '--global-shortcuts ', 'JSON file with global shortcut configuration. See https://github.com/jiahaog/nativefier/blob/master/docs/api.md#global-shortcuts', ) + .option( + '--darwin-dark-mode-support', + '(macOS only) enable Dark Mode support on macOS 10.14+', + ) .parse(sanitizedArgs); if (!process.argv.slice(2).length) { diff --git a/src/constants.js b/src/constants.js index 4919ad6..0d20ff7 100644 --- a/src/constants.js +++ b/src/constants.js @@ -1,5 +1,5 @@ import path from 'path'; export const DEFAULT_APP_NAME = 'APP'; -export const ELECTRON_VERSION = '3.1.7'; +export const ELECTRON_VERSION = '5.0.10'; export const PLACEHOLDER_APP_DIR = path.join(__dirname, './../', 'app'); diff --git a/src/helpers/packagerConsole.js b/src/helpers/packagerConsole.js index 1d2f77b..72006f1 100644 --- a/src/helpers/packagerConsole.js +++ b/src/helpers/packagerConsole.js @@ -6,6 +6,7 @@ class PackagerConsole { this.logs = []; } + // eslint-disable-next-line no-underscore-dangle _log(...messages) { this.logs.push(...messages); } diff --git a/src/options/optionsMain.js b/src/options/optionsMain.js index 247d9f4..7b5730e 100644 --- a/src/options/optionsMain.js +++ b/src/options/optionsMain.js @@ -77,6 +77,7 @@ export default function(inpOptions) { alwaysOnTop: inpOptions.alwaysOnTop || false, titleBarStyle: inpOptions.titleBarStyle || null, globalShortcuts: inpOptions.globalShortcuts || null, + darwinDarkModeSupport: inpOptions.darwinDarkModeSupport || false, }; if (options.verbose) {