|
1 | 1 | Contribute to Che-Theia
|
2 | 2 | ================
|
3 | 3 |
|
| 4 | +Table of contents |
| 5 | + |
| 6 | + - [Introduction](#introduction) |
| 7 | + - [Devfiles](#devfiles) |
| 8 | + - [Devfile for contributing to Theia or Che-Theia extensions or Che-plugins](#devfile-for-contributing-to-theia-or-che-theia-extensions-or-che-plugins) |
| 9 | + - [Contributing to other parts of Che Theia](#contributing-to-other-parts-of-che-theia) |
| 10 | + |
| 11 | +## Introduction |
| 12 | + |
4 | 13 | There are 3 contribution points:
|
5 | 14 | - Theia
|
6 | 15 | - Che-Theia extensions
|
@@ -129,10 +138,33 @@ To start che-theia in `dev-mode` with yarn (not using the production che-theia g
|
129 | 138 | Running dev theia would be located in the che-dev container and `theia-dev-flow` endpoint:
|
130 | 139 | 
|
131 | 140 |
|
132 |
| - |
133 |
| - |
134 | 141 | ### Just want to build the plugin and run with the existing Theia image
|
135 | 142 | If you do not have any changes on Theia or Che-theia extension, you could just build the plugins with `build ... containers-plugin` or `build ... factory-plugin`
|
136 | 143 | and run these plugins with the existing che-theia app:
|
137 | 144 | `run ... HOSTED che-theia + container-plugin` or `run ... HOSTED che-theia + factory-plugin`
|
138 | 145 |
|
| 146 | +## Contributing to other parts of Che Theia |
| 147 | + |
| 148 | +### How to develop Che Theia remote plugin mechanism |
| 149 | + |
| 150 | +_Please note, this section provides a flow how to develop remote plugin mechanism in Che Theia, but not a remote plugin._ |
| 151 | + |
| 152 | +First, create a workspace from prepared [devfile](https://github.com/eclipse/che-theia/blob/master/extensions/eclipse-che-theia-plugin-remote/devfile.yaml), which could be found in the `eclipse-che-theia-plugin-remote` extension folder. |
| 153 | +When workspace is ready: |
| 154 | + - Init Che Theia. This could be done with `che:theia init` command in `/projects/theia` folder or run the init command. |
| 155 | + Che Theia sources will be awailable at `/projects/theia/che/che-theia`. |
| 156 | + - Now one may make changes in Che Theia remote plugin mechanism in both (Che Theia and Remote plugin) sides. |
| 157 | + - Build Che Theia from `theia-dev` container by executing `yarn` in `/projects/theia` folder or by running corresponding command. |
| 158 | + - Put your remote plugin(s) into `/projects/remote-plugins/` directory. |
| 159 | + Note that the plugin(s) shouldn't have any external dependencies. |
| 160 | + For example, [this sample plugin](https://github.com/eclipse/che-theia-samples/tree/master/samples/hello-world-backend-plugin) might be used. |
| 161 | + - Run dev Che Theia and Remote plugins endpoint in `theia-dev` and `theia-remote-runtime-dev` containers correspondingly. |
| 162 | + One may use predefined commands to start them. |
| 163 | + - Open `theia-dev` route from `My Workspace` panel and test chenges. |
| 164 | + |
| 165 | +Also it is possible to run watchers for remote plugin mechanism. |
| 166 | +In `theia-dev` container run `npx run watch @eclipse-che/theia-remote` from `/projects/theia` folder to recompile the extension on changes made. |
| 167 | +Also run `yarn watch` in `/projects/theia/examples/assembly` to bring the changes to Che Theia binaries. |
| 168 | +If needed one may start watchers in plugin API extension: `npx run watch @theia/plugin-ext` from `/projects/theia` directory. |
| 169 | +The commands for these actions are also available. |
| 170 | +But please note, you have to restart server to which changes is made. |
0 commit comments