-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(angular): use collections on generators (#221)
- Loading branch information
1 parent
d486408
commit 769985c
Showing
29 changed files
with
274 additions
and
269 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
...c/schematics/application/_routing_files/src/app/features/home/components/index.ts__tmpl__
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
import { HomeComponent } from './home.component'; | ||
|
||
export const HOME_COMPONENTS = [HomeComponent]; | ||
|
||
export * from './home.component'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
packages/angular/src/schematics/component/_index_files/index.ts__tmpl__
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,7 @@ | ||
import { <%= utils.classify(name) %>Component } from './<%= name %>/<%= name %>.component'; | ||
|
||
export const <%= subFolder ? utils.sanitize(subFolder).toUpperCase() : utils.sanitize(name).toUpperCase() %>_COMPONENTS = [ | ||
<%= utils.classify(name) %>Component | ||
]; | ||
|
||
export * from './<%= name %>/<%= name %>.component'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
packages/angular/src/schematics/directive/_index_files/index.ts__tmpl__
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,11 @@ | ||
import { <%= utils.classify(name) %>Directive } from './<%= name %>.directive'; | ||
|
||
<% if (feature) { %> | ||
export const <%= utils.sanitize(feature).toUpperCase() %>_DIRECTIVES = [ | ||
<% } else { %> | ||
export const UI_DIRECTIVES = [ | ||
<% } %> | ||
<%= utils.classify(name) %>Directive | ||
]; | ||
|
||
export * from './<%= name %>.directive'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
packages/angular/src/schematics/pipe/_index_files/index.ts__tmpl__
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,11 @@ | ||
import { <%= utils.classify(name) %>Pipe } from './<%= name %>.pipe'; | ||
|
||
<% if (feature) { %> | ||
export const <%= utils.sanitize(feature).toUpperCase() %>_PIPES = [ | ||
<% } else { %> | ||
export const UI_PIPES = [ | ||
<% } %> | ||
<%= utils.classify(name) %>Pipe | ||
]; | ||
|
||
export * from './<%= name %>.pipe'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
packages/angular/src/schematics/xplat/_lib_files/features/ui/pipes/index.ts__tmpl__
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
import { DateOrderPipe } from './date-order.pipe'; | ||
|
||
export const UI_PIPES = [DateOrderPipe]; | ||
|
||
export * from './date-order.pipe'; |
10 changes: 6 additions & 4 deletions
10
packages/angular/src/schematics/xplat/_lib_files/features/ui/ui.module.ts__tmpl__
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { TranslateModule } from '@ngx-translate/core'; | ||
import { DateOrderPipe } from './pipes'; | ||
import { UI_PIPES } from './pipes'; | ||
|
||
const MODULES = [TranslateModule]; | ||
|
||
@NgModule({ | ||
imports: [TranslateModule], | ||
declarations: [DateOrderPipe], | ||
exports: [TranslateModule, DateOrderPipe] | ||
imports: [...MODULES], | ||
declarations: [...UI_PIPES], | ||
exports: [...MODULES, ...UI_PIPES] | ||
}) | ||
export class UISharedModule {} |
Oops, something went wrong.