The architecture of the library consists of 3 parts. The common library, the Bootstrap-specific library and the demo project for the specific Bootstrap version.
The logic of the controls is to be implemented in the common library. It does not contain any definitions about the rendering of the control
The markup for the respective Bootstrap version must be implemented in the Boostrap-specific library. No custom styles should be implemented, instead the standard Bootstrap classes should be used. In individual exceptions, specific styles may be necessary for the controls. However, this is only permitted if there is no other option and no styles may be used for colour definitions and shapes.
Example :graph TD
Common --> Boostrap3 --> DemoBootstrap3[Demo Boostrap 3];
Common --> Boostrap4 --> DemoBootstrap4[Demo Boostrap 4];
Common --> Boostrap5 --> DemoBootstrap5[Demo Boostrap 5];
To start the environment, 3 projects must be carried out.
npm run run-common
npm run run-bs3
npm run demo-bs3
Boostrap 3 Demo runs under URL: http://localhost:4200
npm run run-common
npm run run-bs4
npm run demo-bs4
Boostrap 4 Demo runs under URL: http://localhost:4201
npm run run-common
npm run run-bs5
npm run demo-bs5
Boostrap 5 Demo runs under URL: http://localhost:4202
To create a build without a live update, the following commands can be executed
npm run build-common
npm run build-bs3
npm run build-bs4
npm run build-bs5
To update all documentation, it is recommended to use the corresponding build command. This updates the documentation for all projects.
./build.ps1 --target=doc
This command only updates the Boostrap 3 documentation
Example :npm run-script compodoc-bs3
This command only updates the Boostrap 4 documentation
Example :npm run-script compodoc-bs4
This command only updates the Boostrap 3 documentation
Example :npm run-script compodoc-bs5
To create or edit tests, execute the following command
npm run test-edit-bs3
npm run test-edit-bs4
npm run test-edit-bs5
The following commands are available to start the tests
This command is used for the tests for all projects.
Example :./build.ps1 --target=test
npm run test-bs3
npm run test-bs4
npm run test-bs5
If these error messages are displayed during a test, the NGCC must be executed again. To do this, execute the following command.
Example :npm run ngcc
The following command must be executed for the Powershell script to be executed, Otherwise the following error is displayed:
Example :./build.ps1 : File C:\Daten\jNetwork\ch.jnetwork.angularcontrols\build.ps1 cannot be loaded because running scripts is disabled
on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ ./build.ps1
+ ~~~~~~~~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
Command to correct the problem
Example :Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
To perform the build process for all projects, execute the following command in a Powershell
Example :build.ps1
To execute all tests in a Powershell, execute the following command
Example :build.ps1 --target=test
To update the documentation, execute the following command in a Powershell
Example :build.ps1 --target=doc
To create a release, execute the following command in a Powershell
.\build.ps1 --target=release --patch
.\build.ps1 --target=release --minor
.\build.ps1 --target=release --major
.\build.ps1 --target=release --prerelease
--nopublish
Does not publish the package in the NPM registry
--notest
Deactivates the Cypress tests