Skip to main content

Legacy Angular App - Development Process

NOTE: This advice relates to the legacy Angular frontend, which we are deprecating and is included for reference purposes until that work is complete.

Build

Makefile make supervision-compile-assets

Running this command will compile a production build of the Supervision node application and output the files to opg-sirius/front-end/supervision/dist this will then be served inside the supervision container if you run the local development environment(make dev-up).

Build & Watch

Makefile: make supervision-watch

Assuming that you already have a local environment running (make dev-up), running these commands will stop your local supervision container, run webpack with a watcher that will recompile any source files that change and mount opg-sirius/front-end/supervision/dist inside the supervision container. Any changes to the JavaScript source will be immediately available within the container.

Jest Tests

Makefile: make supervision-jest

Running this command will execute the Jest unit tests for the Supervision application.

Jest Tests - Run & Watch

Makefile: make supervision-jest-watch

Running this command will execute the Jest unit tests for the Supervision application with a file watcher that will re-run all the tests should you make any changes to the test or source code.

If you only want to watch the files you are changing (as opposed to running all the tests every time you make a change), run yarn test:watch in the front-end/supervision.

This page was last reviewed on 31 August 2022. It needs to be reviewed again on 28 February 2023 by the page owner #opg-sirius-develop .
This page was set to be reviewed before 28 February 2023 by the page owner #opg-sirius-develop. This might mean the content is out of date.