Skip to content

Commit

Permalink
Updated the README to include Babel/ES6 usage (#18)
Browse files Browse the repository at this point in the history
The usage example in the README results in a syntax error for Babel/ES6 users, as reported by @matthiaslau in #15:

`SyntaxError: 'return' outside of function.`
  • Loading branch information
nimerix authored and durran committed Nov 25, 2016
1 parent cfd9594 commit 29221a0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ add the following to the top of your `main.js` and you're good to go:
```js
if(require('electron-squirrel-startup')) return;
```
For Babel/ES6:

```js
const { app } = require('electron');
// ....
if(require('electron-squirrel-startup')) app.quit();
```

## Read More

Expand Down

0 comments on commit 29221a0

Please sign in to comment.