Skip to content

Commit

Permalink
People copy/paste, so don't use top-level await code
Browse files Browse the repository at this point in the history
  • Loading branch information
malept committed May 25, 2019
1 parent 70b0aa0 commit 5023df6
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ $ npm install --save-dev electron-installer-debian

Edit the `scripts` section of your `package.json`:

```js
```json
{
"name": "app",
"description": "An awesome app!",
Expand Down Expand Up @@ -166,15 +166,17 @@ const options = {
arch: 'amd64'
}

console.log('Creating package (this may take a while)')

try {
await installer(options)
console.log(`Successfully created package at ${options.dest}`)
} catch (err) {
console.error(err, err.stack)
process.exit(1)
async function main (options) {
console.log('Creating package (this may take a while)')
try {
await installer(options)
console.log(`Successfully created package at ${options.dest}`)
} catch (err) {
console.error(err, err.stack)
process.exit(1)
}
}
main(options)
```

You'll end up with the package at `dist/installers/app_0.0.1_amd64.deb`.
Expand Down

0 comments on commit 5023df6

Please sign in to comment.