# BrefCore

bref-core-npm-module is an NPM module built on Angular framework to provide all common UI components, service methods (for API calls, toast, etc.) and utilities used in BRE-Portal.

## Usage

NPM modules created for BRE-Portal uses this module to inherit all common UI components and common assets for consistency and reusability.

## Dependent Modules

1. ngx-infinite-scroll
2. primeflex
3. primeicons
4. primeng
5. toastify-js
6. ngx-lottie
7. lottie-web
8. ng-apexcharts
9. apexcharts

## Development framework

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.0.7.

## Configure @bref scope registry

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

## Development server

Run `ng serve` for a dev server. Navigate to `http://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 `npm run build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.

## Running unit tests

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

## Publish

Before publishing verify that the package version has been updated appropriately at `projects\core\package.json`. Publishing new versions of the module will be handled by the Jenkins pipeline when your changes are merged to the master branch.

## Pull Requests

Each pull request should detail what changes have been made as a part of the prospective release version, in accordance with the [PR template](https://us-confluence.mcd.com/display/BREP/Development+Guidelines#DevelopmentGuidelines-PullRequestTemplate).

## 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).
