Update readme (#4772)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2024-02-26 12:02:34 +07:00 committed by GitHub
parent 57b15752ba
commit 12e057c983
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 28 additions and 15 deletions

View File

@ -35,7 +35,7 @@ Various teams are building products on top of the Platform, including [Huly](htt
## Pre-requisites ## Pre-requisites
- Make sure you have the following installed on your system: - 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](https://docs.docker.com/get-docker/)
- [Docker Compose](https://docs.docker.com/compose/install/) - [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`). - 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. 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 ```bash
cd ./dev/ 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 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. 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: or just:
```bash ```bash
@ -116,7 +122,8 @@ rushx dev-server
Then go to http://localhost:8080 Then go to http://localhost:8080
Use the following login credentials: Use the following login credentials:
```
```plain
Email: user1 Email: user1
Password: 1234 Password: 1234
Workspace: ws1 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 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 ## Tests

View File

@ -193,12 +193,12 @@
"incremental": true "incremental": true
}, },
{ {
"summary": "docker:rebuild", "commandKind": "global",
"commandKind": "phased", "name": "docker:up",
"name": "docker:rebuild", "summary": "Up development build",
"phases": ["_phase:build", "_phase:bundle", "_phase:package", "_phase:docker-build"], "description": "Up development build",
"enableParallelism": true, "safeForSimultaneousRushProcesses": true,
"incremental": false "shellCommand": "cd ./dev && docker compose up -d --force-recreate"
}, },
{ {
"summary": "docker:staging", "summary": "docker:staging",

View File

@ -1,6 +1,6 @@
cd ./dev/ cd ./dev/
rush build # Will build all the required packages. # rush build # Will build all the required packages.
rush bundle # Will prepare bundles. # rush bundle # Will prepare bundles.
rush docker:build # Will build Docker containers for all applications in the local Docker environment. 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