Skip to content
Permalink
Browse files

feat(initializer): add electron-squirrel-startup to the default template

  • Loading branch information
malept committed Sep 3, 2017
1 parent 6c30219 commit e0e42aa2d53c264d9ff71287568db4c57851f00d
Showing with 6 additions and 1 deletion.
  1. +1 −1 src/init/init-npm.js
  2. +5 −0 tmpl/index.js
@@ -10,7 +10,7 @@ import yarnOrNpm from '../util/yarn-or-npm';

const d = debug('electron-forge:init:npm');

export const deps = ['electron-compile'];
export const deps = ['electron-compile', 'electron-squirrel-startup'];
export const devDeps = ['babel-preset-env', 'babel-preset-react', 'babel-plugin-transform-async-to-generator', 'electron-forge'];
export const exactDevDeps = ['electron-prebuilt-compile'];
export const standardDeps = ['standard'];
@@ -1,5 +1,10 @@
import { app, BrowserWindow } from 'electron';

// Handle creating/removing shortcuts on Windows when installing/uninstalling.
if (require('electron-squirrel-startup')) {
app.quit();
}

// 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;

0 comments on commit e0e42aa

Please sign in to comment.
You can’t perform that action at this time.