Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: when create feature with directory flag the files got wrong due to missing using with prefix #106

Open
wizardnet972 opened this issue Apr 24, 2022 · 0 comments

Comments

@wizardnet972
Copy link

wizardnet972 commented Apr 24, 2022

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

export * from './lib/booking-domain.module';
export * from './lib/application/foo-view.facade';
export * from './lib/application/bar-view.facade';

image

ALSO the component gets prefix but no need for prefix.

image

-----

Suggested Solution: add directory prefix to facade files including module names.

When I create a feature with directory flag, the files:

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
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

No branches or pull requests

1 participant