Build OpenEMS UI

This chapter explains, how OpenEMS UI can be compiled so that it can be executed outside of an IDE.

Open the terminal inside Visual Studio Code (Menu: TerminalNew Terminal).

1. Build using angular-cli from command line

Execute the following commands inside the ui directory of your OpenEMS repository. The build artifacts will be stored in a subfolder of the target directory

To get more help on angular-cli use ng help or go check out the Angular-CLI README.

Be aware that there is currently a bug in how angular-cli generates the service-worker configuration file (ngsw-config.json). After running the above command it is required to fix 'regex' statements in the file, replacing double ‘\\’ by single ‘\’ to avoid wrong escaping.

1.1. Build for OpenEMS Backend

Execute

ng build -c backend

The build artifacts are created in the directory ui/target/backend.

1.2. Build for OpenEMS Edge

Execute

ng build -c edge

The build artifacts are created in the directory ui/target/edge.