Skip to content

Commit

Permalink
Improve documentation for the configure of package.json
Browse files Browse the repository at this point in the history
Signed-off-by: zhaomenghuan <[email protected]>
  • Loading branch information
zhaomenghuan committed Nov 3, 2020
1 parent 0548797 commit fedde48
Showing 1 changed file with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions 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 & Target Config**](#build-target-&-target-config)
- [**Application Properties**](#application-properties)
- [**Default Preferences**](#default-preferences)
- [**Default Theme**](#default-theme)
- [**Build Target**](#build-target)
- [**Target Config**](#target-config)
- [**Using Latest Builds**](#using-latest-builds)
- [**Building**](#building)
- [**Build**](#build)
Expand Down Expand Up @@ -109,11 +110,30 @@ Default color and icon themes can be configured in `theia.frontend.config` secti
},
```

### Build Target & Target Config
### Build Target

The following targets are supported: `browser` and `electron`. By default `browser` target is used.
The target can be configured in the `package.json` via `theia/target` property, e.g:

```json
{
"theia": {
"target": "electron"
},
"dependencies": {
"@theia/electron": "latest"
}
}
```

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.

### Target Config

Application configuration for the frontend provides specific configurations for different target.There is an `electron` field configuration under `frontend.config` to configure the Electron target.The electron field currently supports the following configurations:
- disallowReloadKeybinding:If set to `true`, reloading the current browser window won't be possible with the `Ctrl/Cmd + R` 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": {
Expand All @@ -132,15 +152,10 @@ The target can be configured in the `package.json` via `theia/target` property,
}
}
}
},
"dependencies": {
"@theia/electron": "latest"
}
}
```

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.

### 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 fedde48

Please sign in to comment.