mobi-office-libs
v1.2.5
Published
Shared Angular library for MobiOffice apps. Built against Angular 14 (Partial Ivy) so the published package is consumable by Angular 14, 15, 16, 17, 18, 19, and 20.
Readme
mobi-office-libs
Shared Angular library for MobiOffice. Published as mobi-office-libs on npm.
Why a separate workspace?
This package is consumed by 12+ MobiOffice Angular apps that span Angular versions 14 → 20. To keep one published artifact compatible across all of them, the library is built outside the Nx monorepo in a dedicated Angular 14 workspace using ng-packagr's Partial Ivy compilation. Partial-Ivy packages are forward-compatible with every Angular version >= the build version, so building against the lowest supported version (14) is the safest choice.
Supported Angular versions
>=14.0.0 <21.0.0 — covers Angular 14, 15, 16, 17, 18, 19, 20 and all minor/patch releases between.
Building
npm install
npm run buildOutput lands in ../../dist/mobi-office-libs.
Publishing
npm run publish:libThis builds first, then publishes the dist/mobi-office-libs folder to npm (access: public).
Consuming from an app
import { MaintenanceBannerModule } from 'mobi-office-libs/maintenance-banner';
@NgModule({
imports: [MaintenanceBannerModule]
})
export class AppModule {}<mobioffice-maintenance-banner [config]="{ appKey: 'my-app', userId: 'u1' }"></mobioffice-maintenance-banner>What's inside
maintenance-banner— secondary entry point. Polls a notification endpoint and renders a dismissable banner. Minimum poll interval: 5 minutes (smaller values are clamped to protect the backend).
Adding a new entry point
- Create
projects/mobi-office-libs/<name>/with anng-package.json, a barrelindex.ts, and the component/service files. - Re-export the public surface in
src/public-api.tsif you want a flat import path too.
