Copyright (C) 2019- RERO
SONAR UI is the user interface of SONAR, the Swiss Open Access Repository. It is made with Angular 22 and @rero/ng-core.
- Node.js 24
- pnpm 12 (the exact version is set in the
packageManagerfield ofpackage.json) - sonar installed and running on
https://localhost:5000
pnpm install
pnpm run serve # dev server, with the API proxied to https://localhost:5000| Command | Description |
|---|---|
pnpm run serve |
Development server with the API proxy |
pnpm run build |
Production build in dist/sonar |
pnpm test |
Unit tests (Vitest) |
pnpm run lint |
ESLint |
pnpm run format |
Format the code with Prettier (imports sorted) |
pnpm run format:check |
Check the formatting, as the CI does |
pnpm run pack |
Production build packed as rero-sonar-ui-X.X.X.tgz |
./run-tests.sh |
Formatting, lint, tests and build, as the CI does |
To install a pack in a local SONAR, pass it to the bootstrap script of sonar:
./scripts/bootstrap -t ../sonar-ui/rero-sonar-ui-X.X.X.tgz.
Pack ng-core (pnpm run pack in ../ng-core), add an override to
pnpm-workspace.yaml, then run pnpm install:
overrides:
'@rero/ng-core': 'file:../ng-core/rero-ng-core-X.X.X.tgz'Do not commit this override. The CI builds ng-core from the reference written in
.ng-core-ref (published, a branch of rero/ng-core, or owner/ng-core@branch).
The CSS layers are ordered theme, sonar-ui, optimus, utilities. The order is
declared in src/index.html and, in production, in the templates of the sonar
backend: keep them in sync (see .ai/project-context.md).