angular-architects / nx-ddd-plugin

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

feature request: add SCAM support #82

Closed wizardnet972 closed 2 years ago

wizardnet972 commented 3 years ago

Add an option to create components as Single Angular Module Schematics using the schematics.

Single Angular Module Schematics makes tree-shaking much better.

The file should have both decorators: @Component and @NgModule.

@Component(...)
export class Component... 

@NgModule({
  declarations: [Component...],
  exports: [Component]
})
export class Module...

@manfredsteyer I can send PR quickly.

manfredsteyer commented 2 years ago

I really like the SCAM idea as a mental model. For the implementation, I'd rather wait for Standalone Components