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.
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:
npm install --global @nrwl/cliThis will install the CLI globally in your machine.
You should be good to go.
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:
npm install
npm ci --prefix libs/nextgen --omit=peer --ignore-scripts --no-audit --no-fundThe 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.
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:
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 previouslyThe --parallel switch is optional but helps in speeding up the testing process.