Open wizardnet972 opened 2 years ago
When I run commands to create features in different directories (with the same name) the command is successfully executed:
yarn nx g @angular-architects/ddd:feature --app ddd-ui --lazy --directory foo --name view --domain booking yarn nx g @angular-architects/ddd:feature --app ddd-ui --lazy --directory bar --name view --domain booking
But inside the domain lib, only one view.facade.ts was created. and in the index.ts is exporting files that do not exist: https://github.com/wizardnet972/nx-ddd/blob/main/libs/booking/domain/src/index.ts#L3
view.facade.ts
index.ts
export * from './lib/booking-domain.module'; export * from './lib/application/foo-view.facade'; export * from './lib/application/bar-view.facade';
ALSO the component gets prefix but no need for prefix.
Suggested Solution: add directory prefix to facade files including module names.
When I create a feature with directory flag, the files:
directory
Reproduce:
git clone https://github.com/wizardnet972/nx-ddd.git yarn check the domain file.
OR
npx create-nx-workspace ✔ Workspace name (e.g., org name) · nx-ddd ✔ What to create in the new workspace · angular ✔ Application name · ddd-ui ✔ Default stylesheet format · scss yarn add @angular-architects/ddd yarn nx g @angular-architects/ddd:domain booking yarn nx g @angular-architects/ddd:feature --app ddd-ui --lazy --directory foo --name view --domain booking yarn nx g @angular-architects/ddd:feature --app ddd-ui --lazy --directory bar --name view --domain booking
When I run commands to create features in different directories (with the same name) the command is successfully executed:
But inside the domain lib, only one
view.facade.ts
was created. and in theindex.ts
is exporting files that do not exist: https://github.com/wizardnet972/nx-ddd/blob/main/libs/booking/domain/src/index.ts#L3ALSO the component gets prefix but no need for prefix.
Suggested Solution: add directory prefix to facade files including module names.
When I create a feature with
directory
flag, the files:Reproduce:
OR