This project was generated using Nx.
When creating a PR:
It's highly recommended NOT to update the version manually. Because it will be bumped automatically by the pipeline.
But, if you have to bump the version manually:
- Update the version in package.json file
- set your git commit message as following: "... bump/0.0.2 ..."
By default, api request will be proxying to BaaS env:
Please follow this guideline to access BaaS from your local
npm i -g nx
Run nx serve <app-name>
for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
Example:
## Business Banking USA
nx serve business-usa
## Business Banking Universal
nx serve business-universal
## Retail USA
nx serve retail-usa
## Wealth
nx serve wealth-app
Run nx build <app-name>
to build the project. The build artifacts will be stored in the dist/
directory. Use the --prod
flag for a production build.
Example:
## Business Banking USA
nx build business-usa
## Business Banking Universal
nx build business-universal
## Retail USA
nx build retail-usa
## Wealth
nx build wealth-app
## Prerequisite: Build the app `nx build <app-name>`
## Example:
nx build business-usa
## nx build-docker <app-name> --docker-registry=<your-docker-registry> --image-tag=<tag>
## Example:
nx build-docker business-usa --docker-registry=harbor.backbase.eu/development/business-web-app-test --image-tag=0.0.14
## Prerequisite: Build the affected project
npm run build:affected
## Build docker image
npm run build:docker
By default, it will use:
- docker registry:
harbor.backbase.eu/staging
- Image name:
<app-name>
- Image tag:
latest
If you want to set your own docker registry and image tag, please set the following env vars before you run npm run build:docker
:
## export CHANGE_DOCKER_REGISTRY=<your-docker-registry>
## Example:
export CHANGE_DOCKER_REGISTRY=harbor.backbase.eu/development/business-web-app-test
## export CHANGE_IMAGE_TAG=<image.tag>
## Example:
export CHANGE_IMAGE_TAG=0.0.14
Run nx test <app-name>
to execute the unit tests.
Run nx affected:test
to execute the unit tests affected by a change.
Run nx e2e <app-name>
to execute the end-to-end
Run nx affected:e2e
to execute the end-to-end tests affected by a change.
Run nx dep-graph
to see a diagram of the dependencies of your projects.
Run nx g app my-new-app
to generate an application.
You can use any of the plugins above to generate applications as well.
When using Nx, you can create multiple applications and libraries in the same workspace.
Run nx g lib my-new-lib --directory=custom/directory
to generate a library.
You can also use any of the plugins above to generate libraries as well.
Libraries are shareable across libraries and applications. They can be imported from @backbase/my-lib
.
Run nx g component my-new-component --project=my-new-app
to generate a new component.
See project.json
, set:
...
"baseHref": "${BASE_HREF::-1}",
...
See environment.<corresponding configuration file>.ts
. eg: environment.prod.ts
, then set:
....
localize: true,
....
See project.json
, set:
...
"baseHref": "${BASE_HREF}"
...
It's only applicable for dev environment by setting up enableMocks = true
in local storage.
In order to change or test some states in Cash Flow Journey, you need to pass some values to localStorage.
Vars | Description |
---|---|
localStorage.setItem("enableMocks", true); | enable/disable mocks in application (disabled if set to false) |
localStorage.setItem('smeLinkedStatus', 'true'); | enable/disable accounting software linking flow |
localStorage.setItem('forecastExist', 'true'); | enable/disable initial setup forecast flow |
localStorage.setItem('dataFetched', 'true'); | enable/disable data fetching flow (showing data fetching sceen) |