Automated Angular component build¶
When compiling ITsynch.Suite.Identity.Application
project, an automated build
is executed to generate the javascript and css binary files that are used in the
views.
To do that, we are using MSBuild to set up a few environment variables:
-
The Angular Path variable defines the expected path where to find the angular project. This is set inside the default.props file
-
The yarn command is the command that will be executed in the AngularPath. This command will build the identity-elements angular project.
-
The Artifacts Path is the path where the files generated by the previous build will be located. This files will be embedded into the Identity.Application assembly.
-
The Elements Path is the path where the Artifacts files will be copied to be used when building Identity with Docker. Every file will be embedded into the Identity.Application assembly.
-
The RunAngularBuild flag indicates when to run the automated build. By default the value is false. If true, the automated build will be run.
The Automated build consist of three steps:
-
First, the yarn command is executed. If the build is successful the result files will be located at the Artifacts Path.
-
After the angular build is finished, the generated files will be located at the Artifacts Path and copied into the Elements Path. This step is needed to build Identity locally with docker.
-
To complete the process, the files located at the Artifacts Path are directly embedded into the Identity.Application assembly.