installer, desktop shortcut, grunt
installer, desktop shortcut, grunt

file:b/Gruntfile.js (new)
--- /dev/null
+++ b/Gruntfile.js
@@ -1,1 +1,42 @@
+module.exports = function(grunt) {
 
+    grunt.initConfig({
+        pkg: grunt.file.readJSON('app/package.json'),
+        'create-windows-installer': {
+            x64: {
+                appDirectory: 'dist/<%= pkg.name %>-win32-x64/',
+                outputDirectory: 'installer/64',
+                authors: 'razvan.stanga@webstyler.ro',
+                description: '<%= pkg.description %>',
+                exe: '<%= pkg.name %>.exe',
+                title : '<%= pkg.name %>',
+                iconUrl: 'file://app/app.ico',
+                //setupIcon: "file://app/app.ico"
+            }
+        },
+        electron: {
+            x64: {
+                options: {
+                    name: '<%= pkg.name %>',
+                    dir: 'app',
+                    out: 'dist',
+                    version: '0.36.5',
+                    platform: 'win32',
+                    arch: 'x64',
+                    icon: 'app/app.ico',
+                    'version-string' : {
+                        CompanyName : 'Webstyler',
+                        FileDescription : '<%= pkg.description %>',
+                        OriginalFilename : '<%= pkg.name %>',
+                        ProductName : '<%= pkg.name %>'
+                    }
+                }
+            }
+        }
+    });
+
+    grunt.loadNpmTasks('grunt-electron-installer');
+    grunt.loadNpmTasks('grunt-electron');
+
+    grunt.registerTask('default', ['electron', 'create-windows-installer']);
+};

file:b/app/index.html (new)
--- /dev/null
+++ b/app/index.html
@@ -1,1 +1,191 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="UTF-8">
+    <title></title>
+  </head>
+  <body>
+    <h1>Hello World!</h1>
+    We are using node <script>document.write(process.versions.node)</script>,
+    Chrome <script>document.write(process.versions.chrome)</script>,
+    and Electron <script>document.write(process.versions.electron)</script>.
 
+    <a href="#" id="basic">basic notification</a>
+    <a href="#" id="image">image notification</a>
+
+  </body>
+
+<script>
+const remote = require('electron').remote;
+const Menu = remote.Menu;
+const MenuItem = remote.MenuItem;
+
+var menu = new Menu();
+menu.append(new MenuItem({ label: 'MenuItem1', click: function() { console.log('item 1 clicked'); } }));
+menu.append(new MenuItem({ type: 'separator' }));
+menu.append(new MenuItem({ label: 'MenuItem2', type: 'checkbox', checked: true }));
+
+window.addEventListener('contextmenu', function (e) {
+    e.preventDefault();
+    menu.popup(remote.getCurrentWindow());
+}, false);
+
+
+var template = [
+  {
+    label: 'View',
+    submenu: [
+      {
+        label: 'Reload',
+        accelerator: 'CmdOrCtrl+R',
+        click: function(item, focusedWindow) {
+          if (focusedWindow)
+            focusedWindow.reload();
+        }
+      },
+      {
+        label: 'Toggle Full Screen',
+        accelerator: (function() {
+          if (process.platform == 'darwin')
+            return 'Ctrl+Command+F';
+          else
+            return 'F11';
+        })(),
+        click: function(item, focusedWindow) {
+          if (focusedWindow)
+            focusedWindow.setFullScreen(!focusedWindow.isFullScreen());
+        }
+      },
+      {
+        label: 'Toggle Developer Tools',
+        accelerator: (function() {
+          if (process.platform == 'darwin')
+            return 'Alt+Command+I';
+          else
+            return 'Ctrl+Shift+I';
+        })(),
+        click: function(item, focusedWindow) {
+          if (focusedWindow)
+            focusedWindow.toggleDevTools();
+        }
+      },
+    ]
+  },
+  {
+    label: 'Window',
+    role: 'window',
+    submenu: [
+      {
+        label: 'Minimize 1',
+        accelerator: 'CmdOrCtrl+M',
+        role: 'minimize'
+      },
+      {
+        label: 'Close',
+        accelerator: 'CmdOrCtrl+W',
+        role: 'close'
+      },
+    ]
+  },
+  {
+    label: 'Help',
+    role: 'help',
+    submenu: [
+      {
+        label: 'Learn More',
+        click: function() { require('electron').shell.openExternal('http://electron.atom.io') }
+      },
+    ]
+  },
+];
+
+if (process.platform == 'darwin') {
+  var name = require('electron').app.getName();
+  template.unshift({
+    label: name,
+    submenu: [
+      {
+        label: 'About ' + name,
+        role: 'about'
+      },
+      {
+        type: 'separator'
+      },
+      {
+        label: 'Services',
+        role: 'services',
+        submenu: []
+      },
+      {
+        type: 'separator'
+      },
+      {
+        label: 'Hide ' + name,
+        accelerator: 'Command+H',
+        role: 'hide'
+      },
+      {
+        label: 'Hide Others',
+        accelerator: 'Command+Alt+H',
+        role: 'hideothers'
+      },
+      {
+        label: 'Show All',
+        role: 'unhide'
+      },
+      {
+        type: 'separator'
+      },
+      {
+        label: 'Quit',
+        accelerator: 'Command+Q',
+        click: function() { app.quit(); }
+      },
+    ]
+  });
+  // Window menu.
+  template[3].submenu.push(
+    {
+      type: 'separator'
+    },
+    {
+      label: 'Bring All to Front',
+      role: 'front'
+    }
+  );
+}
+
+var menu = Menu.buildFromTemplate(template);
+Menu.setApplicationMenu(menu);
+
+var path = require('path');
+var options = [
+  {
+    title: "Basic Notification",
+    body: "Short message part"
+  },
+  {
+    title: "Content-Image Notification",
+    body: "Short message plus a custom content image",
+    icon: path.join(__dirname, 'app.ico')
+  }
+]
+
+function doNotify(evt) {
+  if (evt.srcElement.id == "basic") {
+    new Notification(options[0].title, options[0]);
+  }
+  else if (evt.srcElement.id == "image") {
+    new Notification(options[1].title, options[1]);
+  }
+}
+
+document.addEventListener('DOMContentLoaded', function() {
+  document.getElementById("basic").addEventListener("click", doNotify);
+  document.getElementById("image").addEventListener("click", doNotify);
+})
+
+</script>
+
+</html>
+

file:b/app/main.js (new)
--- /dev/null
+++ b/app/main.js
@@ -1,1 +1,161 @@
+'use strict';
 
+const electron = require('electron');
+// Module to control application life.
+const app = electron.app;
+// Module to create native browser window.
+const BrowserWindow = electron.BrowserWindow;
+const globalShortcut = electron.globalShortcut;
+
+const path = require('path');
+const cp = require('child_process');
+
+const AppMenus = require("./menus.js");
+
+var handleSquirrelEvent = function() {
+    if (process.platform != 'win32') {
+        return false;
+    }
+
+    function executeSquirrelCommand(args, done) {
+      var updateDotExe = path.resolve(path.dirname(process.execPath),
+         '..', 'update.exe');
+      var child = cp.spawn(updateDotExe, args, { detached: true });
+      child.on('close', function(code) {
+         done();
+      });
+    };
+
+    function install(done) {
+        var target = path.basename(process.execPath);
+        executeSquirrelCommand(["--createShortcut", target], done);
+    };
+
+    function uninstall(done) {
+        var target = path.basename(process.execPath);
+        executeSquirrelCommand(["--removeShortcut", target], done);
+    };
+
+    var squirrelEvent = process.argv[1];
+    switch (squirrelEvent) {
+      case '--squirrel-install':
+         install(app.quit);
+         return true;
+      case '--squirrel-updated':
+         install(app.quit);
+         return true;
+      case '--squirrel-obsolete':
+         app.quit();
+         return true;
+      case '--squirrel-uninstall':
+         uninstall(app.quit);
+         return true;
+    }
+
+    return false;
+};
+
+if (handleSquirrelEvent()) {
+   return;
+}
+
+// Keep a global reference of the window object, if you don't, the window will
+// be closed automatically when the JavaScript object is garbage collected.
+let mainWindow;
+
+function createWindow() {
+    // Create the browser window.
+    let electronScreen = electron.screen;
+    let size = electronScreen.getPrimaryDisplay().workAreaSize;
+    let width = 9 * size.width/10;
+    let height = 9 * size.height/10;
+    mainWindow = new BrowserWindow({width: width, height: height, show: true, skipTaskbar: true});
+    //mainWindow = new BrowserWindow({width: 1000, height: 800, show: false});
+
+    // and load the index.html of the app.
+    //mainWindow.loadURL('file://' + __dirname + '/index.html');
+    mainWindow.loadURL('http://deadline-app.dev.webstyler.ro/backend_base/backend-dashboard');
+
+    // Open the DevTools.
+    //mainWindow.webContents.openDevTools();
+
+    // Emitted when the window is closed.
+    mainWindow.on('closed', function() {
+        // Dereference the window object, usually you would store windows
+        // in an array if your app supports multi windows, this is the time
+        // when you should delete the corresponding element.
+        mainWindow = null;
+    });
+
+    // Emitted when the window is closed.
+    mainWindow.on('close', function(event) {
+        event.preventDefault();
+        this.hide();
+    });
+
+    mainWindow.on('minimize', function() {
+        // Hide window
+        this.hide();
+    });
+
+    /*mainWindow.setThumbarButtons([
+        {
+            tooltip: "button1",
+            icon: path.join(__dirname, 'button1.png'),
+            click: function() { console.log("button2 clicked"); }
+        }
+    ]);*/
+    mainWindow.setAutoHideMenuBar(true);
+
+    /*new Notification('Demo', {
+        body: 'Notification with icon',
+        icon: 'icon.ico'
+    });*/
+
+    let ap = new AppMenus(mainWindow, electron).render();
+
+    let accelerator = 'CmdOrCtrl+Shift+D';
+    if (globalShortcut.isRegistered(accelerator) == false) {
+        globalShortcut.register(accelerator, function() {
+            mainWindow.show();
+        });
+    }
+}
+
+// This method will be called when Electron has finished
+// initialization and is ready to create browser windows.
+app.on('ready', createWindow);
+
+app.on('will-quit', function(event) {
+    globalShortcut.unregisterAll();
+});
+
+// Quit when all windows are closed.
+app.on('window-all-closed', function (event) {
+    // On OS X it is common for applications and their menu bar
+    // to stay active until the user quits explicitly with Cmd + Q
+    if (process.platform !== 'darwin') {
+        app.quit();
+    }
+});
+
+app.on('activate', function () {
+    // On OS X it's common to re-create a window in the app when the
+    // dock icon is clicked and there are no other windows open.
+    if (mainWindow === null) {
+        createWindow();
+    }
+});
+
+let shouldQuit = app.makeSingleInstance(function(commandLine, workingDirectory) {
+    if (mainWindow) {
+        mainWindow.show();
+        if (mainWindow.isMinimized()) mainWindow.restore();
+            mainWindow.focus();
+        }
+    return true;
+});
+
+if (shouldQuit) {
+    app.exit(0);
+}

file:b/app/menus.js (new)
--- /dev/null
+++ b/app/menus.js
@@ -1,1 +1,172 @@
+'use strict';
 
+let mainWindow;
+let app;
+let Menu;
+let Tray;
+let globalShortcut;
+
+class AppMenus {
+    constructor(win, electron) {
+        mainWindow = win;
+        app = electron.app;
+        Menu = electron.Menu;
+        Tray = electron.Tray;
+        globalShortcut = electron.globalShortcut;
+        return this;
+    }
+
+    tray() {
+        let appIcon = null;
+        appIcon = new Tray('resources/app/app.ico');
+        let contextMenu = Menu.buildFromTemplate([
+            {
+                label: 'Show',
+                accelerator: 'CmdOrCtrl+Shift+D',
+                click: function() {
+                    mainWindow.show();
+                }
+            },
+            {
+                label: 'Toggle DevTools',
+                click: function() {
+                    mainWindow.show();
+                    mainWindow.toggleDevTools();
+                }
+            },
+            {
+                label: 'Quit',
+                selector: 'terminate:',
+                click: function() {
+                    app.exit(0);
+                }
+            }
+        ]);
+        appIcon.setToolTip('DeadlineApp by Webstyler');
+        appIcon.setContextMenu(contextMenu);
+        appIcon.on('double-click', function() {
+            mainWindow.show();
+        });
+        appIcon.on('click', function() {
+            mainWindow.show();
+        });
+    }
+
+    menu() {
+       let template = [
+          {
+            label: 'Edit',
+            submenu: [
+              {
+                label: 'Undo',
+                accelerator: 'CmdOrCtrl+Z',
+                role: 'undo'
+              },
+              {
+                label: 'Redo',
+                accelerator: 'Shift+CmdOrCtrl+Z',
+                role: 'redo'
+              },
+              {
+                type: 'separator'
+              },
+              {
+                label: 'Cut',
+                accelerator: 'CmdOrCtrl+X',
+                role: 'cut'
+              },
+              {
+                label: 'Copy',
+                accelerator: 'CmdOrCtrl+C',
+                role: 'copy'
+              },
+              {
+                label: 'Paste',
+                accelerator: 'CmdOrCtrl+V',
+                role: 'paste'
+              },
+              {
+                label: 'Select All',
+                accelerator: 'CmdOrCtrl+A',
+                role: 'selectall'
+              },
+            ]
+          },
+          {
+            label: 'View',
+            submenu: [
+              {
+                label: 'Reload',
+                accelerator: 'F5',
+                click: function(item, focusedWindow) {
+                  if (focusedWindow)
+                    focusedWindow.reload();
+                }
+              },
+              {
+                label: 'Toggle Full Screen',
+                accelerator: (function() {
+                  if (process.platform == 'darwin')
+                    return 'Ctrl+Command+F';
+                  else
+                    return 'F11';
+                })(),
+                click: function(item, focusedWindow) {
+                  if (focusedWindow)
+                    focusedWindow.setFullScreen(!focusedWindow.isFullScreen());
+                }
+              },
+              {
+                label: 'Toggle Developer Tools',
+                accelerator: (function() {
+                  if (process.platform == 'darwin')
+                    return 'Alt+Command+I';
+                  else
+                    return 'Ctrl+Shift+I';
+                })(),
+                click: function(item, focusedWindow) {
+                  if (focusedWindow)
+                    focusedWindow.toggleDevTools();
+                }
+              },
+            ]
+          },
+          {
+            label: 'Window',
+            role: 'window',
+            submenu: [
+                {
+                    label: 'Minimize',
+                    accelerator: 'CmdOrCtrl+M',
+                    role: 'minimize'
+                },
+                {
+                    label: 'Close',
+                    accelerator: 'CmdOrCtrl+W',
+                    role: 'close'
+                },
+            ]
+          },
+          /*{
+            label: 'Help',
+            role: 'help',
+            submenu: [
+              {
+                label: 'Learn More',
+                click: function() { require('electron').shell.openExternal('http://electron.atom.io') }
+              },
+            ]
+          },*/
+        ];
+
+        let menu = Menu.buildFromTemplate(template);
+        Menu.setApplicationMenu(menu);
+    }
+
+    render() {
+        this.tray();
+        this.menu();
+    }
+}
+
+module.exports = AppMenus;

file:b/app/package.json (new)
--- /dev/null
+++ b/app/package.json
@@ -1,1 +1,6 @@
-
+{
+  "name"    : "DeadlineApp",
+  "description" : "DeadlineApp by Webstyler",
+  "version" : "0.1.0",
+  "main"    : "main.js"
+}

file:a/index.html (deleted)
--- a/index.html
+++ /dev/null
@@ -1,191 +1,1 @@
-<!DOCTYPE html>
-<html>
-  <head>
-    <meta charset="UTF-8">
-    <title></title>
-  </head>
-  <body>
-    <h1>Hello World!</h1>
-    We are using node <script>document.write(process.versions.node)</script>,
-    Chrome <script>document.write(process.versions.chrome)</script>,
-    and Electron <script>document.write(process.versions.electron)</script>.
 
-    <a href="#" id="basic">basic notification</a>
-    <a href="#" id="image">image notification</a>
-
-  </body>
-
-<script>
-const remote = require('electron').remote;
-const Menu = remote.Menu;
-const MenuItem = remote.MenuItem;
-
-var menu = new Menu();
-menu.append(new MenuItem({ label: 'MenuItem1', click: function() { console.log('item 1 clicked'); } }));
-menu.append(new MenuItem({ type: 'separator' }));
-menu.append(new MenuItem({ label: 'MenuItem2', type: 'checkbox', checked: true }));
-
-window.addEventListener('contextmenu', function (e) {
-    e.preventDefault();
-    menu.popup(remote.getCurrentWindow());
-}, false);
-
-
-var template = [
-  {
-    label: 'View',
-    submenu: [
-      {
-        label: 'Reload',
-        accelerator: 'CmdOrCtrl+R',
-        click: function(item, focusedWindow) {
-          if (focusedWindow)
-            focusedWindow.reload();
-        }
-      },
-      {
-        label: 'Toggle Full Screen',
-        accelerator: (function() {
-          if (process.platform == 'darwin')
-            return 'Ctrl+Command+F';
-          else
-            return 'F11';
-        })(),
-        click: function(item, focusedWindow) {
-          if (focusedWindow)
-            focusedWindow.setFullScreen(!focusedWindow.isFullScreen());
-        }
-      },
-      {
-        label: 'Toggle Developer Tools',
-        accelerator: (function() {
-          if (process.platform == 'darwin')
-            return 'Alt+Command+I';
-          else
-            return 'Ctrl+Shift+I';
-        })(),
-        click: function(item, focusedWindow) {
-          if (focusedWindow)
-            focusedWindow.toggleDevTools();
-        }
-      },
-    ]
-  },
-  {
-    label: 'Window',
-    role: 'window',
-    submenu: [
-      {
-        label: 'Minimize 1',
-        accelerator: 'CmdOrCtrl+M',
-        role: 'minimize'
-      },
-      {
-        label: 'Close',
-        accelerator: 'CmdOrCtrl+W',
-        role: 'close'
-      },
-    ]
-  },
-  {
-    label: 'Help',
-    role: 'help',
-    submenu: [
-      {
-        label: 'Learn More',
-        click: function() { require('electron').shell.openExternal('http://electron.atom.io') }
-      },
-    ]
-  },
-];
-
-if (process.platform == 'darwin') {
-  var name = require('electron').app.getName();
-  template.unshift({
-    label: name,
-    submenu: [
-      {
-        label: 'About ' + name,
-        role: 'about'
-      },
-      {
-        type: 'separator'
-      },
-      {
-        label: 'Services',
-        role: 'services',
-        submenu: []
-      },
-      {
-        type: 'separator'
-      },
-      {
-        label: 'Hide ' + name,
-        accelerator: 'Command+H',
-        role: 'hide'
-      },
-      {
-        label: 'Hide Others',
-        accelerator: 'Command+Alt+H',
-        role: 'hideothers'
-      },
-      {
-        label: 'Show All',
-        role: 'unhide'
-      },
-      {
-        type: 'separator'
-      },
-      {
-        label: 'Quit',
-        accelerator: 'Command+Q',
-        click: function() { app.quit(); }
-      },
-    ]
-  });
-  // Window menu.
-  template[3].submenu.push(
-    {
-      type: 'separator'
-    },
-    {
-      label: 'Bring All to Front',
-      role: 'front'
-    }
-  );
-}
-
-var menu = Menu.buildFromTemplate(template);
-Menu.setApplicationMenu(menu);
-
-var path = require('path');
-var options = [
-  {
-    title: "Basic Notification",
-    body: "Short message part"
-  },
-  {
-    title: "Content-Image Notification",
-    body: "Short message plus a custom content image",
-    icon: path.join(__dirname, 'app.ico')
-  }
-]
-
-function doNotify(evt) {
-  if (evt.srcElement.id == "basic") {
-    new Notification(options[0].title, options[0]);
-  }
-  else if (evt.srcElement.id == "image") {
-    new Notification(options[1].title, options[1]);
-  }
-}
-
-document.addEventListener('DOMContentLoaded', function() {
-  document.getElementById("basic").addEventListener("click", doNotify);
-  document.getElementById("image").addEventListener("click", doNotify);
-})
-
-</script>
-
-</html>
-

file:a/main.js (deleted)
--- a/main.js
+++ /dev/null
@@ -1,112 +1,1 @@
-'use strict';
 
-const electron = require('electron');
-// Module to control application life.
-const app = electron.app;
-// Module to create native browser window.
-const BrowserWindow = electron.BrowserWindow;
-const globalShortcut = electron.globalShortcut;
-
-const path = require('path');
-const AppMenus = require("./menus.js");
-
-// Keep a global reference of the window object, if you don't, the window will
-// be closed automatically when the JavaScript object is garbage collected.
-let mainWindow;
-
-function createWindow() {
-    // Create the browser window.
-    let electronScreen = electron.screen;
-    let size = electronScreen.getPrimaryDisplay().workAreaSize;
-    let width = 9 * size.width/10;
-    let height = 9 * size.height/10;
-    mainWindow = new BrowserWindow({width: width, height: height, show: true, skipTaskbar: true});
-    //mainWindow = new BrowserWindow({width: 1000, height: 800, show: false});
-
-    // and load the index.html of the app.
-    //mainWindow.loadURL('file://' + __dirname + '/index.html');
-    mainWindow.loadURL('http://deadline-app.dev.webstyler.ro/backend_base/backend-dashboard');
-
-    // Open the DevTools.
-    //mainWindow.webContents.openDevTools();
-
-    // Emitted when the window is closed.
-    mainWindow.on('closed', function() {
-        // Dereference the window object, usually you would store windows
-        // in an array if your app supports multi windows, this is the time
-        // when you should delete the corresponding element.
-        mainWindow = null;
-    });
-
-    // Emitted when the window is closed.
-    mainWindow.on('close', function(event) {
-        event.preventDefault();
-        this.hide();
-    });
-
-    mainWindow.on('minimize', function() {
-        // Hide window
-        this.hide();
-    });
-
-    /*mainWindow.setThumbarButtons([
-        {
-            tooltip: "button1",
-            icon: path.join(__dirname, 'button1.png'),
-            click: function() { console.log("button2 clicked"); }
-        }
-    ]);*/
-    mainWindow.setAutoHideMenuBar(true);
-
-    /*new Notification('Demo', {
-        body: 'Notification with icon',
-        icon: 'icon.ico'
-    });*/
-
-    let ap = new AppMenus(mainWindow, electron).render();
-
-    let accelerator = 'CmdOrCtrl+Shift+D';
-    if (globalShortcut.isRegistered(accelerator) == false) {
-        globalShortcut.register(accelerator, function() {
-            mainWindow.show();
-        });
-    }
-}
-
-// This method will be called when Electron has finished
-// initialization and is ready to create browser windows.
-app.on('ready', createWindow);
-
-app.on('will-quit', function(event) {
-    globalShortcut.unregisterAll();
-});
-
-// Quit when all windows are closed.
-app.on('window-all-closed', function (event) {
-    // On OS X it is common for applications and their menu bar
-    // to stay active until the user quits explicitly with Cmd + Q
-    if (process.platform !== 'darwin') {
-        app.quit();
-    }
-});
-
-app.on('activate', function () {
-    // On OS X it's common to re-create a window in the app when the
-    // dock icon is clicked and there are no other windows open.
-    if (mainWindow === null) {
-        createWindow();
-    }
-});
-
-let shouldQuit = app.makeSingleInstance(function(commandLine, workingDirectory) {
-    if (mainWindow) {
-        mainWindow.show();
-        if (mainWindow.isMinimized()) mainWindow.restore();
-            mainWindow.focus();
-        }
-    return true;
-});
-
-if (shouldQuit) {
-    app.exit(0);
-}

file:a/menus.js (deleted)
--- a/menus.js
+++ /dev/null
@@ -1,172 +1,1 @@
-'use strict';
 
-let mainWindow;
-let app;
-let Menu;
-let Tray;
-let globalShortcut;
-
-class AppMenus {
-    constructor(win, electron) {
-        mainWindow = win;
-        app = electron.app;
-        Menu = electron.Menu;
-        Tray = electron.Tray;
-        globalShortcut = electron.globalShortcut;
-        return this;
-    }
-
-    tray() {
-        let appIcon = null;
-        appIcon = new Tray('app.ico');
-        let contextMenu = Menu.buildFromTemplate([
-            {
-                label: 'Show',
-                accelerator: 'CmdOrCtrl+Shift+D',
-                click: function() {
-                    mainWindow.show();
-                }
-            },
-            {
-                label: 'Toggle DevTools',
-                click: function() {
-                    mainWindow.show();
-                    mainWindow.toggleDevTools();
-                }
-            },
-            {
-                label: 'Quit',
-                selector: 'terminate:',
-                click: function() {
-                    app.exit(0);
-                }
-            }
-        ]);
-        appIcon.setToolTip('DeadlineApp by Webstyler');
-        appIcon.setContextMenu(contextMenu);
-        appIcon.on('double-click', function() {
-            mainWindow.show();
-        });
-        appIcon.on('click', function() {
-            mainWindow.show();
-        });
-    }
-
-    menu() {
-       let template = [
-          {
-            label: 'Edit',
-            submenu: [
-              {
-                label: 'Undo',
-                accelerator: 'CmdOrCtrl+Z',
-                role: 'undo'
-              },
-              {
-                label: 'Redo',
-                accelerator: 'Shift+CmdOrCtrl+Z',
-                role: 'redo'
-              },
-              {
-                type: 'separator'
-              },
-              {
-                label: 'Cut',
-                accelerator: 'CmdOrCtrl+X',
-                role: 'cut'
-              },
-              {
-                label: 'Copy',
-                accelerator: 'CmdOrCtrl+C',
-                role: 'copy'
-              },
-              {
-                label: 'Paste',
-                accelerator: 'CmdOrCtrl+V',
-                role: 'paste'
-              },
-              {
-                label: 'Select All',
-                accelerator: 'CmdOrCtrl+A',
-                role: 'selectall'
-              },
-            ]
-          },
-          {
-            label: 'View',
-            submenu: [
-              {
-                label: 'Reload',
-                accelerator: 'F5',
-                click: function(item, focusedWindow) {
-                  if (focusedWindow)
-                    focusedWindow.reload();
-                }
-              },
-              {
-                label: 'Toggle Full Screen',
-                accelerator: (function() {
-                  if (process.platform == 'darwin')
-                    return 'Ctrl+Command+F';
-                  else
-                    return 'F11';
-                })(),
-                click: function(item, focusedWindow) {
-                  if (focusedWindow)
-                    focusedWindow.setFullScreen(!focusedWindow.isFullScreen());
-                }
-              },
-              {
-                label: 'Toggle Developer Tools',
-                accelerator: (function() {
-                  if (process.platform == 'darwin')
-                    return 'Alt+Command+I';
-                  else
-                    return 'Ctrl+Shift+I';
-                })(),
-                click: function(item, focusedWindow) {
-                  if (focusedWindow)
-                    focusedWindow.toggleDevTools();
-                }
-              },
-            ]
-          },
-          {
-            label: 'Window',
-            role: 'window',
-            submenu: [
-                {
-                    label: 'Minimize',
-                    accelerator: 'CmdOrCtrl+M',
-                    role: 'minimize'
-                },
-                {
-                    label: 'Close',
-                    accelerator: 'CmdOrCtrl+W',
-                    role: 'close'
-                },
-            ]
-          },
-          /*{
-            label: 'Help',
-            role: 'help',
-            submenu: [
-              {
-                label: 'Learn More',
-                click: function() { require('electron').shell.openExternal('http://electron.atom.io') }
-              },
-            ]
-          },*/
-        ];
-
-        let menu = Menu.buildFromTemplate(template);
-        Menu.setApplicationMenu(menu);
-    }
-
-    render() {
-        this.tray();
-        this.menu();
-    }
-}
-
-module.exports = AppMenus;

file:a/package.json (deleted)
--- a/package.json
+++ /dev/null
@@ -1,5 +1,1 @@
-{
-  "name"    : "deadline",
-  "version" : "0.1.0",
-  "main"    : "main.js"
-}
+

comments