Skip to content

Commit 61c5def

Browse files
author
Alexander Vakrilov
authored
chore(cleanup): Repo cleanup (#1003)
* chore(cleanup): Use index files and move module definitionss in folders * chore(cleanup): remove collection-facade.ts * chore(cleanup): Limit the use of lang-facade * chore: Fixed value-accessors imports
1 parent c264453 commit 61c5def

27 files changed

+98
-289
lines changed

nativescript-angular/animations.ts renamed to nativescript-angular/animations/animations.module.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ import {
1313
ɵBrowserAnimationBuilder as BrowserAnimationBuilder,
1414
} from "@angular/platform-browser/animations";
1515

16-
import { NativeScriptAnimationEngine } from "./animations/animation-engine";
17-
import { NativeScriptAnimationDriver } from "./animations/animation-driver";
18-
import { NativeScriptModule } from "./nativescript.module";
19-
import { NativeScriptRendererFactory } from "./renderer";
16+
import { NativeScriptAnimationEngine } from "./animation-engine";
17+
import { NativeScriptAnimationDriver } from "./animation-driver";
18+
import { NativeScriptModule } from "../nativescript.module";
19+
import { NativeScriptRendererFactory } from "../renderer";
2020

2121
@Injectable()
2222
export class InjectableAnimationEngine extends NativeScriptAnimationEngine {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "./animations.module";

nativescript-angular/collection-facade.ts

Lines changed: 0 additions & 134 deletions
This file was deleted.

nativescript-angular/directives.ts

Lines changed: 0 additions & 42 deletions
This file was deleted.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import { ListViewComponent, TemplateKeyDirective } from "./list-view-comp";
2+
import { TabViewDirective, TabViewItemDirective } from "./tab-view";
3+
import {
4+
ActionBarComponent,
5+
ActionBarScope,
6+
ActionItemDirective,
7+
NavigationButtonDirective
8+
} from "./action-bar";
9+
import { AndroidFilterComponent, IosFilterComponent } from "./platform-filters";
10+
11+
export {
12+
ListViewComponent,
13+
SetupItemViewArgs,
14+
TemplateKeyDirective
15+
} from "./list-view-comp";
16+
17+
export { TabViewDirective, TabViewItemDirective } from "./tab-view";
18+
export {
19+
ActionBarComponent,
20+
ActionBarScope,
21+
ActionItemDirective,
22+
NavigationButtonDirective
23+
} from "./action-bar";
24+
export { AndroidFilterComponent, IosFilterComponent } from "./platform-filters";
25+
26+
export const NS_DIRECTIVES = [
27+
ListViewComponent,
28+
TemplateKeyDirective,
29+
TabViewDirective,
30+
TabViewItemDirective,
31+
ActionBarComponent,
32+
ActionBarScope,
33+
ActionItemDirective,
34+
NavigationButtonDirective,
35+
AndroidFilterComponent,
36+
IosFilterComponent,
37+
];

nativescript-angular/directives/list-view-comp.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import {
1818
TemplateRef,
1919
ViewChild,
2020
ViewContainerRef,
21+
ɵisListLikeIterable as isListLikeIterable
2122
} from "@angular/core";
2223
import { ListView, ItemEventData } from "tns-core-modules/ui/list-view";
2324
import { View, KeyedTemplate } from "tns-core-modules/ui/core/view";
@@ -26,7 +27,6 @@ import { ObservableArray } from "tns-core-modules/data/observable-array";
2627
import { profile } from "tns-core-modules/profiling";
2728

2829
import { getSingleViewRecursive } from "../element-registry";
29-
import { isListLikeIterable } from "../collection-facade";
3030
import { listViewLog, listViewError } from "../trace";
3131

3232
const NG_VIEW = "_ngViewRef";

nativescript-angular/dom-adapter.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import { Type } from "@angular/core";
33
import { ɵDomAdapter } from "@angular/platform-browser";
44
import { rendererLog } from "./trace";
5-
import { print } from "./lang-facade";
65

76
export class NativeScriptDomAdapter implements ɵDomAdapter {
87
static makeCurrent() {
@@ -27,15 +26,15 @@ export class NativeScriptDomAdapter implements ɵDomAdapter {
2726
}
2827

2928
log(arg: any): void {
30-
print(arg);
29+
console.log(arg);
3130
}
3231

3332
logError(arg: any): void {
34-
print(arg);
33+
console.log(arg);
3534
}
3635

3736
logGroup(arg: any): void {
38-
print(arg);
37+
console.log(arg);
3938
}
4039

4140
logGroupEnd(): void {

nativescript-angular/forms.ts renamed to nativescript-angular/forms/forms.module.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import { NgModule } from "@angular/core";
22
import { FormsModule } from "@angular/forms";
3-
import { TextValueAccessor } from "./value-accessors/text-value-accessor";
4-
import { CheckedValueAccessor } from "./value-accessors/checked-value-accessor";
5-
import { DateValueAccessor } from "./value-accessors/date-value-accessor";
6-
import { TimeValueAccessor } from "./value-accessors/time-value-accessor";
7-
import { NumberValueAccessor } from "./value-accessors/number-value-accessor";
8-
import { SelectedIndexValueAccessor } from "./value-accessors/selectedIndex-value-accessor";
3+
import {
4+
TextValueAccessor,
5+
CheckedValueAccessor,
6+
DateValueAccessor,
7+
TimeValueAccessor,
8+
NumberValueAccessor,
9+
SelectedIndexValueAccessor
10+
} from "./value-accessors";
911

1012
export const FORMS_DIRECTIVES = [
1113
TextValueAccessor,

nativescript-angular/forms/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "./forms.module";

0 commit comments

Comments
 (0)