# BrefMain

Main single page application for BRE-Portal.

## Usage

bref-main-docker consists of main module which creates single page application by injecting all BREF NPM modules for each of its section as plugin and providing route for each through main navigation.

## Dependent Modules

1. bref-core-npm-module
2. bref-menu-npm-module
3. bref-solutions-npm-module
4. bref-deploy-npm-module
5. bref-configure-npm-module

## Configure @bref scope registry

npm login --scope=@bref --registry=https://artifactory.bre.mcd.com/artifactory/api/npm/npm

## Development server

If you have not done so before, run `npm ci` to set up the project's NPM dependencies.

Modify `bref-main/src/app/app.module.ts` and replace the "redirectUri" of `https://portal.bre.mcd.com` with `http://localhost:4200` (remember to revert this before committing changes!) to ensure AD login returns you to the local dev site.

Run `ng serve` for a dev server. Navigate to `https://localhost:4200/`. The app will automatically reload if you change any of the source files.

## Code scaffolding

Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.

## Build

Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.

## Deployment

For deploying a new release of this project, consult the [FE Deploying and Updating FE modules runbook](https://us-confluence.mcd.com/display/BREP/6.+-+FE+Deploying+and+Updating+FE+modules#id-6.-FEDeployingandUpdatingFEmodules-Deployment).

## Running unit tests

Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Veracode packaging

To support Veracode scans of this application, run `ng build` to build the project, and then create a `.zip` file containing both the `/dist` directory and the `/node_modules` directory.

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
