UNPKG

1.41 kBMarkdownView Raw
1![Module](https://img.shields.io/badge/%40platform-electron-%23EA4E7E.svg)
2[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
3[![NPM](https://img.shields.io/npm/v/@platform/electron.svg?colorB=blue&style=flat)](https://www.npmjs.com/package/@platform/electron)
4# electron
5Common utilities for working with [electron](https://electronjs.org).
6
7## Manual Test
8To run an electron test shell, see the [electron-test](../electron-test/README.md) module:
9
10```bash
11cd electron-test
12yarn ui start
13```
14
15
16
17<p>&nbsp;<p>
18
19## Polyfill
20The `babel-polyfill` is included to ensure [Parcel](https://parceljs.org) bundles correctly without causing certain errors when building a production distribution, for example this [issue](https://github.com/parcel-bundler/parcel/issues/871#issuecomment-367899522):
21
22```
23regeneratorRuntime is not defined 😩
24```
25
26<p>&nbsp;<p>
27
28
29## Building for Electron
30If you encounter `dist` build issues you may need to re-compile native modules.
31See [Using Native Node Modules](https://electronjs.org/docs/tutorial/using-native-node-modules) for background.
32
33Run the `rebuild` script against your module. For example, in your `package.json`:
34
35```json
36{
37 "scripts": {
38 "rebuild": "platform.electron rebuild"
39 }
40}
41```
42This will need to be done every time after `npm install` or `yarn install` has been run.
43
44
45<p>&nbsp;<p>
46<p>&nbsp;<p>
47