angular-architects / nx-ddd-plugin

Nx plugin for structuring a monorepo with domains and layers
313 stars 56 forks source link

The component, module and selector name's in ui-module got wrong (schematics) #51

Closed wizardnet972 closed 3 years ago

wizardnet972 commented 3 years ago

I started to use nx-ddd-plugin in my project and I created Auth domain. Inside auth I have this structure:

auth
   |-> domain
   |-> feature-login

And I want to add a dumb component call login-form. so I create login-form under ui folder (this folder contains all dumb components that belong to auth domain) . The schematics adds ui prefix: ui-login-form. inside I created a component: login-form under components folder.

auth
   |-> domain
   |-> feature-login
   |-> ui
        |-> ui-login-form
          |-> src/lib/components/login-form.component.ts
          |-> auth-ui-ui-login-form.module.ts

I don't know something doesn't fit here.. The names are bad. The problem is the selector created for me: login-form-login-form. And also the module name is looking bad.

Any ideas how should I structure this domain with ui-module?

manfredsteyer commented 3 years ago

yes, this is an issue here: On the one side, using the lib name as the prefix prevents conflicts, on the other side it leads to odd names in some circumstances. If the lib's name would be ui-auth or just ui, it would be better, I guess.