File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ const fs = require('fs');
77var isWin = / ^ w i n / . test ( process . platform ) ;
88
99// SET ENV
10- process . env . NODE_ENV = 'development ' ;
10+ process . env . NODE_ENV = 'production ' ;
1111
1212const { app, BrowserWindow, Menu, ipcMain} = electron ;
1313
@@ -32,10 +32,12 @@ app.on('ready', function(){
3232 app . quit ( ) ;
3333 } ) ;
3434
35- // Build menu from template
36- const mainMenu = Menu . buildFromTemplate ( mainMenuTemplate ) ;
37- // Insert menu
38- Menu . setApplicationMenu ( mainMenu ) ;
35+ if ( process . env . NODE_ENV !== 'production' ) {
36+ // Build menu from template
37+ const mainMenu = Menu . buildFromTemplate ( mainMenuTemplate ) ;
38+ // Insert menu
39+ Menu . setApplicationMenu ( mainMenu ) ;
40+ }
3941} ) ;
4042
4143
@@ -90,7 +92,7 @@ ipcMain.on('script:clean', function(e){
9092// Create menu template
9193const mainMenuTemplate = [
9294 // Each object is a dropdown
93- {
95+ /* {
9496 label: 'File',
9597 submenu:[
9698 {
@@ -101,7 +103,7 @@ const mainMenuTemplate = [
101103 }
102104 }
103105 ]
104- }
106+ }*/
105107] ;
106108
107109// If OSX, add empty object to menu
You can’t perform that action at this time.
0 commit comments