Skip to content

feat: scaffold template-lib-angular as a single Angular library project - #10

Merged
NoNamer777 merged 5 commits into
mainfrom
feat/scaffold-angular-library
Aug 13, 2026
Merged

feat: scaffold template-lib-angular as a single Angular library project#10
NoNamer777 merged 5 commits into
mainfrom
feat/scaffold-angular-library

Conversation

@NoNamer777

@NoNamer777 NoNamer777 commented Aug 13, 2026

Copy link
Copy Markdown
Member

Summary

Restructure this repo from the template-app-angular application clone into a library-only workspace, per the "Angular Library Template" map's destination. Redo of #8 (closed unmerged): that attempt left the root package.json's name unchanged and shipped the ng generate library boilerplate README as-is (Karma/e2e references that don't apply here).

  • Ran ng generate library to scaffold @dnd-mapp/template-lib-angular under projects/, with a placeholder add function and its test as the public API surface
  • Removed the app-specific bootstrap (src/main.ts, src/index.html, src/core/**, src/styles.scss) and the now-orphaned tsconfig.app.json/tsconfig.spec.json
  • Dropped the app project from angular.json, and wired the library's build/test/lint targets to match the repo's existing vitest/coverage conventions
  • Set both package.json's name to @dnd-mapp/template-lib-angular
  • Dropped @angular/cdk, @angular/forms, and @angular/router, which were only needed by the removed app bootstrap
  • Kept Stylelint as dormant scaffolding (--allow-empty-input) now that no .scss files remain in the repo, rather than removing it outright

Out of scope here: CI (.github/actions/ci/action.yml still calls pnpm lint-css, fine since it's now a no-op) and docs (README.md, docs/guides/dev/usage.md) still reference the old app-based workflow, since those belong to "Rewrite CI for npm publish" and "Rewrite docs and package metadata", both blocked on this PR.

Related issues

Resolves #2

Checklist

  • Title and description follow the Creating a Pull Request guide
  • Commit messages follow Conventional Commits and are grouped by intent
  • Tests were added or updated as needed
  • Documentation was updated as needed
  • CI checks pass

Run `ng generate library` to add @dnd-mapp/template-lib-angular under
projects/, built via ng-packagr, with a placeholder `add` function and
its test as the public API surface. Wire its build/test/lint targets
to match the repo's existing conventions (coverage thresholds,
reporters, vitest runner), and add it to the root tsconfig's project
references.

The app project stays in place for now; it's removed next.
Drop src/main.ts, src/index.html, src/core/**, src/styles.scss, and
tsconfig.app.json/tsconfig.spec.json, and drop the "app" project and
its now-dead @/core path aliases now that template-lib-angular is the
repo's only project.

The library's own tsconfig.spec.json now carries vitest.config.ts in
its "files" list (as the removed root tsconfig.spec.json used to),
keeping it covered by typed linting.
package.json's name still said template-app-angular; align it and the
Vitest project name with the library this repo now scaffolds.
@angular/cdk, @angular/forms, and @angular/router were only needed by
the removed app.routes.ts, forms usage, and CDK test harness — nothing
in the library or its tests references them.
The design-system SCSS layer and the app's global styles.scss are both
gone, so `stylelint "**/*.scss"` matches nothing and hard-fails.
--allow-empty-input keeps the script a no-op instead of removing
Stylelint outright, since a future component in this library may
still want it.
@NoNamer777
NoNamer777 merged commit 9e8cd27 into main Aug 13, 2026
1 check passed
@NoNamer777
NoNamer777 deleted the feat/scaffold-angular-library branch August 13, 2026 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scaffold the Angular library project

1 participant