Skip to content

Angular Library Template #1

Description

@NoNamer777

Destination

Transform this repo from a clone of template-app-angular (an Angular app template with Docker-image CI) into dnd-mapp/template-lib-angular proper: a template repository, cloned via GitHub's "Use this template" to bootstrap future Angular library repos in the dnd-mapp org, structured as a single Angular library project (via ng generate library, no demo app), containing one example function plus its test as placeholder public-API content, with all app-runtime scaffolding removed (Docker, the SSL dev server, routing/root component, Playwright e2e, the design-system SCSS/token/font layer), and a CI/release pipeline that publishes @dnd-mapp/template-lib-angular to npmjs.org (public registry) via Trusted Publishing plus staged publishing, instead of building/publishing Docker images.

Notes

  • Execution override: tickets in this map carry out the actual repo changes as part of resolving them, this is not a decisions-only map. Still: never resolve more than one ticket per session, except research tickets.
  • Domain concepts/ADRs for this repo live in the org wiki (dnd-mapp/wiki), not locally, see AGENTS.md. ADR 0001 (design-system-in-template-repo-for-now) and ADR 0002 (design-system-plain-folder-not-library) on template-app-angular are relevant precedent (not binding here): ADR 0002 previously deferred ng generate library adoption "until component work starts", this map is that moment. ADR 0007 (docs: add ADR 0007, npmjs.org over GitHub Packages for template-lib-angular wiki#13) records this map's npmjs.org-over-GitHub-Packages registry choice.
  • @dnd-mapp already exists as an org/scope on npmjs.org; no packages have been published under it yet.
  • template-app-angular's own release pipeline (release-prepare.yml/release-publish.yml) has never actually run (0 releases, 0 tags, 0 workflow runs). This map's pipeline is likewise left wired-but-unexercised, a real first publish is an easy manual follow-up once "Configure the npm Trusted Publisher link" is done, not something this map forces through.
  • Invoke /grilling and /domain-modeling for any ticket that surfaces a real remaining decision.

Decisions so far

  • Research npm Trusted Publishing + staged publishing (ticket added below, closed on creation): a package must already exist on the registry before either mechanism can be linked (no OIDC path for a first publish), so a manual bootstrap npm publish is a required, not optional, step; CI itself is publish-and-forget via npm stage publish (no 2FA, doesn't block on approval). Findings kept on the research/npm-trusted-publishing branch, not merged to main, since they're disposable once this map is fulfilled.
  • Remove app-runtime scaffolding: removed Docker, the SSL dev server (including the whole serve/start target, not just its SSL options), Playwright e2e (kept playwright/@vitest/browser-playwright for Vitest's browser mode), and the design-system SCSS/token/font layer, plus the CI jobs/composite actions/docs that only existed to support that scaffolding. Landed as PR #9, split into 5 commits by intent. Rewrite CI for npm publish #5 and Rewrite docs and package metadata #7 were trimmed to drop the removal bullets this already covered.
  • Scaffold the Angular library project: scaffolded @dnd-mapp/template-lib-angular under projects/ via ng generate library (ng-packagr build), with a placeholder add function plus its test as the public API, removed the app bootstrap (src/main.ts, src/index.html, src/core/**), and dropped @angular/cdk/forms/router now that nothing uses them. Kept Stylelint as dormant scaffolding (--allow-empty-input) rather than removing it, since no .scss files remain but a future component might add one. Redo of the earlier feat: scaffold template-lib-angular as a single Angular library project #8 (closed unmerged, which had left the root package.json name unchanged and shipped the schematic's boilerplate README as-is). Landed as PR #10, split into 5 commits by intent.

Not yet specified

  • Whether the org's Angular/TypeScript conventions doc (wiki) needs library-authoring-specific additions (public API surface, secondary entry point conventions). Not clear yet whether the current app-focused conventions fully cover this, revisit once real library code beyond the placeholder function exists.

Out of scope

  • Extracting the real @dnd-mapp/design-system package (per ADR 0001), a separate, not-yet-scheduled effort. This map only removes the app-template's design-system scaffolding; it doesn't build the real package.
  • Updating dnd-mapp/wiki docs/ADRs to reference template-lib-angular, or fixing the stale angular-app-template name found there during research, lives in a different repo, not this destination.
  • Actually publishing a real first version of the package end-to-end, the pipeline is left wired but unexercised; see Notes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions