Skip to content
This repository was archived by the owner on Nov 21, 2024. It is now read-only.

Commit 6a58cdd

Browse files
committed
fix(srcgen): Remove duplicated imports from modules for "web-entity" template
1 parent 109e934 commit 6a58cdd

5 files changed

Lines changed: 18 additions & 43 deletions

File tree

srcgen/web-entity/%libs.platformFolder%/src/components/entities/%entity.name.kebab%/%entity.list.name.kebab%-grid-modal/%entity.list.name.kebab%-grid-modal.module.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
import { CommonModule } from '@angular/common';
22
import { ModuleWithProviders, NgModule } from '@angular/core';
3-
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
4-
import { TranslateModule } from '@ngx-translate/core';
53
import { EntityGridModalModule } from '@rucken/web';
64
import { <%=entity.list.name.camel%>GridModule } from '../<%=entity.list.name.kebab%>-grid/<%=entity.list.name.kebab%>-grid.module';
75
import { <%=entity.list.name.camel%>GridModalComponent } from './<%=entity.list.name.kebab%>-grid-modal.component';
86

97
@NgModule({
108
imports: [
119
CommonModule,
12-
ReactiveFormsModule,
13-
FormsModule,
14-
TranslateModule.forChild(),
1510
EntityGridModalModule,
1611
<%=entity.list.name.camel%>GridModule
1712
],
@@ -22,7 +17,9 @@ import { <%=entity.list.name.camel%>GridModalComponent } from './<%=entity.list.
2217
<%=entity.list.name.camel%>GridModalComponent
2318
],
2419
exports: [
25-
<%=entity.list.name.camel%>GridModalComponent
20+
<%=entity.list.name.camel%>GridModalComponent,
21+
EntityGridModalModule,
22+
<%=entity.list.name.camel%>GridModule
2623
]
2724
})
2825
export class <%=entity.list.name.camel%>GridModalModule {

srcgen/web-entity/%libs.platformFolder%/src/components/entities/%entity.name.kebab%/%entity.list.name.kebab%-grid/%entity.list.name.kebab%-grid.module.ts

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,22 @@
11
import { CommonModule } from '@angular/common';
22
import { ModuleWithProviders, NgModule } from '@angular/core';
3-
import { TranslateModule } from '@ngx-translate/core';
4-
import { ModalModule } from 'ngx-bootstrap/modal';
5-
import { PipesModule } from '@rucken/web';
63
import { EntityGridModule } from '@rucken/web';
7-
import { EntityModalModule, MessageModalModule } from '@rucken/web';
84
import { <%=entity.name.camel%>ModalModule } from '../<%=entity.name.kebab%>-modal/<%=entity.name.kebab%>-modal.module';
95
import { <%=entity.list.name.camel%>GridComponent } from './<%=entity.list.name.kebab%>-grid.component';
106

117
@NgModule({
128
imports: [
139
CommonModule,
14-
MessageModalModule,
15-
TranslateModule.forChild(),
1610
EntityGridModule,
17-
EntityModalModule,
18-
<%=entity.name.camel%>ModalModule,
19-
ModalModule.forRoot(),
20-
PipesModule
11+
<%=entity.name.camel%>ModalModule
2112
],
2213
declarations: [
2314
<%=entity.list.name.camel%>GridComponent
2415
],
2516
exports: [
26-
<%=entity.list.name.camel%>GridComponent
17+
<%=entity.list.name.camel%>GridComponent,
18+
EntityGridModule,
19+
<%=entity.name.camel%>ModalModule
2720
]
2821
})
2922
export class <%=entity.list.name.camel%>GridModule {

srcgen/web-entity/%libs.platformFolder%/src/components/entities/%entity.name.kebab%/%entity.name.kebab%-input/%entity.name.kebab%-input.module.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,22 @@
11
import { CommonModule } from '@angular/common';
22
import { ModuleWithProviders, NgModule } from '@angular/core';
3-
import { TranslateModule } from '@ngx-translate/core';
4-
import { ModalModule } from 'ngx-bootstrap/modal';
5-
import { EntityInputModule, MessageModalModule } from '@rucken/web';
3+
import { EntityInputModule } from '@rucken/web';
64
import { <%=entity.list.name.camel%>GridModalModule } from '../<%=entity.list.name.kebab%>-grid-modal/<%=entity.list.name.kebab%>-grid-modal.module';
75
import { <%=entity.name.camel%>InputComponent } from './<%=entity.name.kebab%>-input.component';
86

97
@NgModule({
108
imports: [
119
CommonModule,
12-
MessageModalModule,
13-
TranslateModule.forChild(),
1410
EntityInputModule,
15-
<%=entity.list.name.camel%>GridModalModule,
16-
ModalModule.forRoot()
11+
<%=entity.list.name.camel%>GridModalModule
1712
],
1813
declarations: [
1914
<%=entity.name.camel%>InputComponent
2015
],
2116
exports: [
22-
<%=entity.name.camel%>InputComponent
17+
<%=entity.name.camel%>InputComponent,
18+
EntityInputModule,
19+
<%=entity.list.name.camel%>GridModalModule
2320
]
2421
})
2522
export class <%=entity.name.camel%>InputModule {

srcgen/web-entity/%libs.platformFolder%/src/components/entities/%entity.name.kebab%/%entity.name.kebab%-modal/%entity.name.kebab%-modal.module.ts

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,12 @@
11
import { CommonModule } from '@angular/common';
22
import { ModuleWithProviders, NgModule } from '@angular/core';
3-
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
4-
import { TranslateModule } from '@ngx-translate/core';
5-
import { DirectivesModule } from '@rucken/web';
6-
import { FormGroupModule } from '@rucken/web';
73
import { PromptFormModalModule } from '@rucken/web';
84
import { <%=entity.name.camel%>ModalComponent } from './<%=entity.name.kebab%>-modal.component';
95

106
@NgModule({
117
imports: [
128
CommonModule,
13-
ReactiveFormsModule,
14-
FormsModule,
15-
TranslateModule.forChild(),
16-
FormGroupModule,
17-
PromptFormModalModule,
18-
DirectivesModule
9+
PromptFormModalModule
1910
],
2011
declarations: [
2112
<%=entity.name.camel%>ModalComponent
@@ -24,7 +15,8 @@ import { <%=entity.name.camel%>ModalComponent } from './<%=entity.name.kebab%>-m
2415
<%=entity.name.camel%>ModalComponent
2516
],
2617
exports: [
27-
<%=entity.name.camel%>ModalComponent
18+
<%=entity.name.camel%>ModalComponent,
19+
PromptFormModalModule
2820
]
2921
})
3022
export class <%=entity.name.camel%>ModalModule {

srcgen/web-entity/%libs.platformFolder%/src/components/entities/%entity.name.kebab%/%entity.name.kebab%-select/%entity.name.kebab%-select.module.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,21 @@
11
import { CommonModule } from '@angular/common';
22
import { ModuleWithProviders, NgModule } from '@angular/core';
3-
import { TranslateModule } from '@ngx-translate/core';
4-
import { ModalModule } from 'ngx-bootstrap/modal';
5-
import { EntitySelectModule, MessageModalModule } from '@rucken/web';
3+
import { EntitySelectModule } from '@rucken/web';
64
import { <%=entity.list.name.camel%>GridModalModule } from '../<%=entity.list.name.kebab%>-grid-modal/<%=entity.list.name.kebab%>-grid-modal.module';
75
import { <%=entity.name.camel%>SelectComponent } from './<%=entity.name.kebab%>-select.component';
86

97
@NgModule({
108
imports: [
119
CommonModule,
12-
MessageModalModule,
13-
TranslateModule.forChild(),
1410
EntitySelectModule,
15-
<%=entity.list.name.camel%>GridModalModule,
16-
ModalModule.forRoot()
11+
<%=entity.list.name.camel%>GridModalModule
1712
],
1813
declarations: [
1914
<%=entity.name.camel%>SelectComponent
2015
],
2116
exports: [
2217
<%=entity.name.camel%>SelectComponent
18+
EntitySelectModule
2319
]
2420
})
2521
export class <%=entity.name.camel%>SelectModule {

0 commit comments

Comments
 (0)