npm Guidelines
August 10, 2026 · View on GitHub
Scope: conventions for implementing work in the
@laczynski/datagrid*npm packages.Package ownership and folder layout: repo-map.md. JSON wire format: getting-started.md.
Stack summary
TypeScript libraries published via npm workspaces. @laczynski/datagrid is framework-agnostic (Vitest). @laczynski/datagrid-primeng is an Angular library built with ng-packagr. ESLint and Prettier apply under src/npm/.
For build, test, and lint commands, see AGENTS.md.
Standard path for a new capability
- If shared contract changes, update
@laczynski/datagridtypes first. - Implement Angular state or PrimeNG UI in
@laczynski/datagrid-primeng. - Implement
@laczynski/datagrid-uiadapter on@laczynski/lui. - Implement Spartan UI in
@laczynski/datagrid-spartan(L1) — follow spartan-ui-alignment.md. For L3 consumer copies, update the CLI schematic and runscripts/sync-spartan-schematic-files.mjs. - Add Vitest tests in the owning package; use
samples/showcase-uifor component integration. - Bump package version in
package.jsonwhen releasing (keep aligned with NuGet preview version).
Angular library conventions
- Standalone components and directives.
- Use signals for grid resource state — avoid mutable class fields for load state.
- Create grids via
inject(GridResourceFactory)orcreateGridResource({ injector, load, … }). - Column + cell templates:
dgColumnonly (declares field, header, filter, and cell body in one template). - Optional empty state:
dgEmptyprojected into<dg-prime-data-grid>. - Do not embed app-specific routes, auth, or API base URLs — consumers pass a
loadfunction.
What does not belong here
- Sample applications —
samples/ - Consumer HTTP services — consumer apps pass
load: (q) => ...intocreateGridResource