chore: generate shared and feature libs with module boundaries per ADR-0003
Generate the four phase-4 libraries: - libs/shared/tokens (project name shared-tokens) - plain TS lib via @nx/js:library; will host the a11y design tokens (palette, contrast tiers, spacing, motion) once Tailwind lands in phase 5; consumable by both apps; tagged scope:shared, type:shared. - libs/shared/util (shared-util) - plain TS lib for cross-cutting utility code; tagged scope:shared, type:shared. - libs/shared/ui (shared-ui) - Angular standalone library that will host the spartan-ng components copy-pasted in phase 5; Angular-only so tagged scope:portal-shell, type:shared. unitTestRunner= vitest-analog because vitest-angular requires a buildable lib. - libs/feature/auth (feature-auth) - placeholder Angular standalone feature lib to demonstrate the type:feature pattern; tagged scope:portal-shell, type:feature. @nx/enforce-module-boundaries depConstraints replaced (root eslint.config.mjs) with the rules from ADR-0003: scope:portal-shell -> scope:portal-shell, scope:shared scope:portal-bff -> scope:portal-bff, scope:shared scope:shared -> scope:shared type:app -> type:feature, type:shared type:feature -> type:feature, type:shared type:shared -> type:shared This forbids portal-shell from importing portal-bff code (and vice versa) and prevents shared libs from depending on feature libs. Project names follow the convention of ADR-0003 (feature-<name> / shared-<scope>) by passing --name explicitly to the generator; the Nx 22 default takes only the last directory segment. Sanity check: pnpm nx run-many -t lint and -t test pass for the 8 projects (4 apps/e2e + 4 libs). Side effects from the generators: tsconfig.base.json paths populated with the lib import aliases; nx.json gains vite/playwright plugin entries; .gitignore picks up vitest.config.*.timestamp* (Vitest temp files); package.json gains @analogjs/vitest-angular and related devDeps; pnpm-lock.yaml regenerated. Two eslint-disable comments in portal-bff-e2e support files were trimmed by lint --fix - those files already lint clean without the directive.
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
"scripts": {},
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"@analogjs/vite-plugin-angular": "~2.1.2",
|
||||
"@analogjs/vitest-angular": "~2.1.2",
|
||||
"@angular-devkit/core": "~21.2.0",
|
||||
"@angular-devkit/schematics": "~21.2.0",
|
||||
"@angular/build": "~21.2.0",
|
||||
@@ -24,6 +26,7 @@
|
||||
"@nx/node": "22.7.1",
|
||||
"@nx/playwright": "22.7.1",
|
||||
"@nx/vite": "^22.7.1",
|
||||
"@nx/vitest": "22.7.1",
|
||||
"@nx/web": "22.7.1",
|
||||
"@nx/webpack": "22.7.1",
|
||||
"@oxc-project/runtime": "^0.115.0",
|
||||
@@ -35,6 +38,8 @@
|
||||
"@types/jest": "^30.0.0",
|
||||
"@types/node": "20.19.9",
|
||||
"@typescript-eslint/utils": "^8.40.0",
|
||||
"@vitest/coverage-v8": "~4.1.0",
|
||||
"@vitest/ui": "~4.1.0",
|
||||
"angular-eslint": "^21.2.0",
|
||||
"eslint": "^9.8.0",
|
||||
"eslint-config-prettier": "^10.0.0",
|
||||
@@ -43,6 +48,7 @@
|
||||
"jest-environment-node": "^30.0.2",
|
||||
"jest-util": "^30.0.2",
|
||||
"jsdom": "^27.1.0",
|
||||
"jsonc-eslint-parser": "^2.1.0",
|
||||
"nx": "22.7.0",
|
||||
"prettier": "^3.8.1",
|
||||
"prisma": "^7.8.0",
|
||||
@@ -51,6 +57,7 @@
|
||||
"tslib": "^2.3.0",
|
||||
"typescript": "~5.9.2",
|
||||
"typescript-eslint": "^8.40.0",
|
||||
"vite": "^8.0.0",
|
||||
"vitest": "^4.0.8",
|
||||
"webpack-cli": "^5.1.4"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user