npm run axe.save http://localhost:4200
npm run lighthouse.save http://localhost:4200
vpat folder will be created. Use these commands after finishing the development. Fixing issues.
- UI:
npx nx generate @seed/plugin-generator:all-lib --directory=feature --domain=book --mfeName= --scope=feature --no-interactive
- Mock:
npx hygen route new
and type the domain name, e.g. book.
# add remote app official command
npx nx generate @nrwl/angular:remote content-hub-mfe --host=seed --addTailwind --backendProject=api --port=4303 --style=scss --tags=type:app --no-interactive
# create remote app and libraries for UI
npx nx generate @seed/plugin-generator:mfe-app ose --displayName='Object Storage' --port=4303 --no-interactive
# create remote app's mock data
npx hygen route new # type "sample"
# run host and remote app
NX_BUILD_DATE=$(date) npx nx serve seed --open --devRemotes=harbor-mfe,ose-mfe
- npx create-nx-workspace@15.6.1
- repository name: seed; application name: seed
- add clarity
- generate tailwind
- add
@nrwl/express
, and generate api express server - generate shared models:
nx generate @nrwl/workspace:library models --skipBabelrc --directory=shared --no-standaloneConfig --testEnvironment=node --unitTestRunner=none
- generate feature lib:
npx nx generate @nrwl/angular:library product --style=scss --directory=feature --changeDetection=OnPush --inlineStyle --lazy --routing --standalone
- clarity ng 15
- tailwind
- express mock server
- POC
- Reproduce issues
- Use this basic template to create advanced templates
Replace seed to your project name.
Run nx serve seed
for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
Run nx graph
to see a diagram of the dependencies of the projects.
Shared Libraries:
- shared/model: nrwl library
- shared/module: angular library
- shared/data-access: angular library, authService authGuard
- shared/ui: angular library
- shared/pipe: angular library
- shared/directive: angular library
- shared/validator: angular library
- shared/util: nrwl library
Core Libraries:
- core/ui: nav, login, about which used only once
- core/interceptor
rde Library
common-assets Library: images, svg, etc
Feature Libraries:
- provider/
- feature1 (library)
- models
- utils
- services
- ui
- feature2 (library)
- models
- utils
- services
- ui
- tenant/
- - Display a welcome page (Shared ui) for both provider and tenant. Wire route for home page.
npx nx generate @nrwl/angular:component welcome --project=shared-ui --changeDetection=OnPush --standalone --no-interactive
- - UT
- - Cypress
- - Schematics
- - a11y
- - upgrade clarity, ngx
- - dark mode, tailwind.
- Generate json-schema by ts: https://github.com/YousefED/typescript-json-schema and https://github.com/vega/ts-json-schema-generator. Generate mock by json-schema
- MFE generator
- Tailwind not working in remote app. nrwl/nx#9784
- how to pass user session in standalone remote app?
core.mjs:8506
ERROR Error: Uncaught (in promise): TypeError: Cannot read properties of undefined (reading 'ɵcmp')
TypeError: Cannot read properties of undefined (reading 'ɵcmp')
at getComponentDef (core.mjs:1240:16)
e.g. export * from './alert/alert.component';
although it is exported from the alert module.
StudentService shared the selected student, but if navigating to other routes and come back, the selected student still exists as the service is not destroyed. Thus, Delete button is still enabled without selecting any student in UI.