Extend README with console stuff and update config.ts part

This commit is contained in:
Kristóf Tóth 2018-06-02 17:10:12 +02:00
parent 23eb73ffe6
commit d99853d88e

View File

@ -21,10 +21,25 @@ These APIs are documented in the [baseimage-tutorial-framework](https://github.c
## Configuration
Most of the time it is not necessary to edit the source code of our components as you can easily customise their behaviour through the `src/app/config.ts` config file.
Generally it is unadvised to directly modify the source code of our pre-written components (this is hard for us to support and is prone to break).
The most notable setting available in this file is the enabling of different layouts, which allows the user and you to switch between them.
Layouts describe which components are visible and where they are on the screen.
For this reason most components are extensively configurable through the `src/app/config.ts` file.
These configurations range from the enabling of different layouts to how frequently should our IDE save automatically.
Many configuration options are changeable dynamically using API messages sent from the backend, like so:
```
{
"key": ...component name...,
"data":
{
"command": ...configuration key...,
"value": ...
}
}
```
Should you encounter any missing features, feel free to contact team TFW and we'll consider implementing them as configuration options (a common example would be making a configuration option dynamic).
### Terminal (webshell)
@ -41,6 +56,21 @@ You can write to it (and thus execute commands) and read what commands were exec
This enables you to pre-type or execute commands for the user and figure out what they are doing in the terminal.
### Console
Not unlike how a desktop IDE displays the output of your application, TFW provides a similar component as well.
The console can appear in place of the terminal and allows you to display the output of a supervisor process in real time.
This means that if you type `print('cats like cheese')` in your application code and run it, you will see `cats like cheese` appear on the console! Pretty neat, right?
You can control the displaying of process logs to the console using the `console.rewriteContentWithProcessLogsOnDeploy` key in `config.ts`.
The value of `stdout` or `stderr` will cause the console to display the respective stream, while an empty string will disable any automatic output to the console altogether.
We recommend redirecting `stdout` and `stderr` to the same file and displaying the together.
The `console.showLiveLogs` key enables real time output from the standard stream you've selected.
### IDE (webIde)
This component is a simple text editor based on ACE.