PowerPlan

Introduction

This is the PowerPlan monorepo for the frontend applications. This monorepo is based and managed by Nx tools. Here we can Angular applications as well as React and some other frameworks.

Getting started

To get started first clone the project and run npm install to install all dependencies. To get easier introduction to use Nx is recommended to install the CLI so all commands can be executed without having to run them through npx. To install the CLI just run:

Example :
npm install --global @nrwl/cli

This will install the CLI globally in your machine.

You should be good to go.

Install NextGen runtime dependencies

NextGen has an independent runtime dependency tree at libs/nextgen/package.json. It pins @powerplan/blueprint and AG Grid 35, while the root package.json continues to provide AG Grid 33 to the other products in this monorepo. After installing the shared root dependencies, install the NextGen tree separately:

Example :
npm install
npm ci --prefix libs/nextgen --omit=peer --ignore-scripts --no-audit --no-fund

The scoped @powerplan:registry in .npmrc resolves Blueprint from the PowerPlan-Blueprint Azure Artifacts feed. The nested install always uses exact versions from libs/nextgen/package-lock.json. To discover and save the latest stable patch in the pinned Blueprint minor line, run npm --prefix libs/nextgen run blueprint:update, review the published migration guide, and commit the nested manifest and lockfile. Do not change the root AG Grid versions.

Build and Test

Building and testing using Nx is rather simple. First the only parts of the repo that are "buildable" are the applications in app folder. To build any of them simple run:

Example :
nx build app-name # This builds the app for non prod mode.
nx build app-name --prod # This builds the app for prod mode.

To unit test the affected libraries and applications run:

Example :
nx affected:test --parallel # Runs unit testing for all affected apps and libraries
nx affected:test --parallel --only-failed # Runs only the tests that failed previously

The --parallel switch is optional but helps in speeding up the testing process.

results matching ""

    No results matching ""