From 12e057c983d81bfd62afbfa30708d4e1d65a7a95 Mon Sep 17 00:00:00 2001
From: Andrey Sobolev <haiodo@users.noreply.github.com>
Date: Mon, 26 Feb 2024 12:02:34 +0700
Subject: [PATCH] Update readme (#4772)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
---
 README.md                            | 25 +++++++++++++++++++------
 common/config/rush/command-line.json | 12 ++++++------
 scripts/build.sh                     |  6 +++---
 3 files changed, 28 insertions(+), 15 deletions(-)

diff --git a/README.md b/README.md
index b61c829376..11d76c7825 100644
--- a/README.md
+++ b/README.md
@@ -35,7 +35,7 @@ Various teams are building products on top of the Platform, including [Huly](htt
 ## Pre-requisites
 
 - Make sure you have the following installed on your system:
-  - [Node.js](https://nodejs.org/en/download/)
+  - [Node.js](https://nodejs.org/en/download/) (v20 is required)
   - [Docker](https://docs.docker.com/get-docker/)
   - [Docker Compose](https://docs.docker.com/compose/install/)
 - Make sure what docker and `docker compose` commands are available in your terminal (e.g. `docker --version` and `docker compose --version`).
@@ -61,16 +61,22 @@ sh ./scripts/presetup-rush.sh
 
 Development environment setup requires Docker to be installed on system.
 
-Support is available for both amd64 and armv8 (arm64) containers on Linux and macOS.
+Support is available for both amd64 and arm64 containers on Linux and macOS.
 
 ```bash
 cd ./dev/
-rush build    # Will build all the required packages.
+rush build    # Will build all the required packages. 
+# rush rebuild  # could be used to omit build cache.
 rush bundle   # Will prepare bundles.
+rush package  # Will build all webpack packages.
+rush validate # Will validate all sources with typescript and generate d.ts files required for ts-node execution.
+rush svelte-check # Optional. svelte files validation using svelte-check.
 rush docker:build   # Will build Docker containers for all applications in the local Docker environment.
-docker compose up -d --force-recreate # Will set up all the containers
+rush docker:up # Will set up all the containers
 ```
 
+Be aware `rush docker:build` will automatically execute all required phases like build, bundle, package.
+
 or just:
 
 ```bash
@@ -116,7 +122,8 @@ rushx dev-server
 Then go to http://localhost:8080
 
 Use the following login credentials:
-```
+
+```plain
 Email: user1
 Password: 1234
 Workspace: ws1
@@ -147,7 +154,13 @@ If a build fails, but the code is correct, try to delete the [build cache](https
 rm -rf common/temp/build-cache
 ```
 
-and retry. 
+and retry.
+
+## Build & Watch
+
+For development purpose `rush build:watch` action could be used.
+
+It includes build and validate phases in watch mode.
 
 ## Tests
 
diff --git a/common/config/rush/command-line.json b/common/config/rush/command-line.json
index ad8584aa40..dec55abd01 100644
--- a/common/config/rush/command-line.json
+++ b/common/config/rush/command-line.json
@@ -193,12 +193,12 @@
       "incremental": true
     },
     {
-      "summary": "docker:rebuild",
-      "commandKind": "phased",
-      "name": "docker:rebuild",
-      "phases": ["_phase:build", "_phase:bundle", "_phase:package", "_phase:docker-build"],
-      "enableParallelism": true,
-      "incremental": false
+      "commandKind": "global",
+      "name": "docker:up",
+      "summary": "Up development build",
+      "description": "Up development build",
+      "safeForSimultaneousRushProcesses": true,
+      "shellCommand": "cd ./dev && docker compose up -d --force-recreate"
     },
     {
       "summary": "docker:staging",
diff --git a/scripts/build.sh b/scripts/build.sh
index 2e69fd232e..12c5b389c9 100644
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -1,6 +1,6 @@
 cd ./dev/
-rush build    # Will build all the required packages.
-rush bundle   # Will prepare bundles.
+# rush build    # Will build all the required packages.
+# rush bundle   # Will prepare bundles.
 rush docker:build   # Will build Docker containers for all applications in the local Docker environment.
-docker compose up -d --force-recreate # Will set up all the containers
+rush docker:up # Will set up all the containers