Skip to content

Commit

Permalink
Add documentation for electron config
Browse files Browse the repository at this point in the history
The following commit adds documentation to the `cli`,
to document the electron target configuration including the
possible options such as `disallowReloadKeybinding` and `windowOptions`.

Signed-off-by: zhaomenghuan <[email protected]>

Improve documentation for the configure of package.json

Signed-off-by: zhaomenghuan <[email protected]>
  • Loading branch information
zhaomenghuan authored and vince-fugnitto committed Nov 4, 2020
1 parent fd0a8ce commit 123bf41
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion dev-packages/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@
- [**Description**](#description)
- [**Getting Started**](#getting-started)
- [**Configure**](#configure)
- [**Build Target**](#build-target)
- [**Application Properties**](#application-properties)
- [**Default Preferences**](#default-preferences)
- [**Default Theme**](#default-theme)
- [**Build Target**](#build-target)
- [**Electron Frontend Application Config**](#electron-frontend-application-config)
- [**Using Latest Builds**](#using-latest-builds)
- [**Building**](#building)
- [**Build**](#build)
Expand Down Expand Up @@ -127,6 +128,37 @@ The target can be configured in the `package.json` via `theia/target` property,

For `electron` target applications, is it mandatory to include **Electron** runtime dependencies. The `@theia/electron` package is the easiest way to install the necessary dependencies.

### Electron Frontend Application Config

The `electron` frontend application configuration provides configuration options for the `electron` target.\
The currently supported configurations are:

- `disallowReloadKeybinding`: if set to `true`, reloading the current browser window won't be possible with the <kbd>Ctrl/Cmd</kbd> + <kbd>r</kbd> keybinding. It is `false` by default. Has no effect if not in an electron environment.
- `windowOptions`: override or add properties to the electron `windowOptions`.

```json
{
"theia": {
"target": "electron",
"frontend": {
"config": {
"electron": {
"disallowReloadKeybinding": true,
"windowOptions": {
"titleBarStyle": "hidden",
"webPreferences": {
"webSecurity": false,
"nodeIntegration": true,
"webviewTag": true
}
}
}
}
}
}
}
```

### Using Latest Builds

If you set `next` in your theia config, then Theia will prefer `next` over `latest` as the latest tag.
Expand Down

0 comments on commit 123bf41

Please sign in to comment.