The installation and configuration of the CSRS development environment is sequentially ordered to ensure software dependencies are available when needed during setup.
The following list includes the required software needed to run the application, as well as, the suggested IDE with extensions for web client development, and software for source control management and API development/testing.
Download and install the Git version control system, and optionally download and install the free GitKraken Git GUI client.
Clone the CSRS repository into a project directory GitKraken or the terminal by typing:
git clone https://github.com/bcgov/jag-csrs-portal-public
Download and install Node v14.x
Install Angular cli using command:
yarn add @angular/cli
Download and install VSCode and accept the prompt to install the recommended extensions when the PRIME repository is initially opened in VSCode.
Download and install the Postman HTTP client.
To build, run, and open the Angular application in the default browser at http://localhost:4200 for development go to the csrs Portal project repository in the terminal and type:
yarn start
To test the production build locally before pushing features to the repository for deployment type:
ng build --configuration production
This project was generated with Angular CLI version 10.1.x. Refer to the Angular CLI documentation for the available commands, but the most used commands during development will be:
yarn install
to install any packages that the application depends on.ng serve -o
to serve your application locally in memory during development athttp://localhost:4200
through the default browser, which watches for changes, recompiles, and automatically refresh the application in the browserng build
to build the application, which is stored in/dist
directory. Use the--prod
flag for a production build, which significantly decreases the size of the applicationng g <blueprint>
to create code scaffolding for a directive, pipe, service, class, guard, interface, enum, and moduleng lint
to lint the application code using TSLint.ng test
to execute the unit tests via Karma.ng e2e
to execute the end-to-end tests via Protractor.
- To get more help on the Angular CLI use
ng help
ng doc component
to look up documentation for featuresng serve --help
to look up doc forng serve
command
Coding styles should adhere to the Angular Style Guide at all times! The editor config setup for the project will also assist with coding style automatically, as well as VSCode settings.