Skip to content

Commit

Permalink
react-devtools: set icon on macos
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-schulze committed Jul 19, 2021
1 parent 262ff7a commit e776fd9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/react-devtools/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

const {app, BrowserWindow} = require('electron'); // Module to create native browser window.
const {join} = require('path');
const os = require('os');

const argv = require('minimist')(process.argv.slice(2));
const projectRoots = argv._;
Expand All @@ -32,6 +33,11 @@ app.on('ready', function() {
},
});

// set dock icon for macos
if (os.platform() === 'darwin') {
app.dock.setIcon(join(__dirname, 'icons/icon128.png'));
}

// https://stackoverflow.com/questions/32402327/
mainWindow.webContents.on('new-window', function(event, url) {
event.preventDefault();
Expand Down

0 comments on commit e776fd9

Please sign in to comment.