From 71b12bfb09ad6bed755fffe68e344d57d1a93a27 Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Tue, 5 Apr 2016 16:52:44 +0200 Subject: [PATCH] Add info about electron-squirrel-startup to avoid https://github.com/electron-userland/electron-builder/issues/279#issuecomment-205832181 --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 54cdf10..d375c2a 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,14 @@ and uninstalls. it is **very** important that your app handle these events as _e as possible, and quit **immediately** after handling them. Squirrel will give your app a short amount of time (~15sec) to apply these operations and quit. +The [electron-squirrel-startup](https://github.com/mongodb-js/electron-squirrel-startup) module will handle +the most common events for you, such as managing desktop shortcuts. Just +add the following to the top of your `main.js` and you're good to go: + +```js +if (require('electron-squirrel-startup')) return; +``` + You should handle these events in your app's `main` entry point with something such as: