Skip to content

Commit fbe2450

Browse files
committed
feat: angular 9 ivy
1 parent e7cfb11 commit fbe2450

35 files changed

+341
-281
lines changed

Diff for: e2e/animation-examples/app/app.module.ts

+20-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,17 @@ import { NativeScriptModule } from "@nativescript/angular";
88
import { NativeScriptAnimationsModule } from "@nativescript/angular/animations";
99
import { NSModuleFactoryLoader } from "@nativescript/angular/router";
1010

11-
import { AppRoutingModule, routedComponents } from "./app.routing";
11+
import { AppRoutingModule } from "./app.routing";
12+
import { AnimationsListComponent } from "./animations-list.component";
13+
import { AnimationBuilderComponent } from "./animation-builder.component";
14+
import { ExternalAnimationComponent } from "./external-animation.component";
15+
import { FadeInOutComponent } from "./fade-in-out.component";
16+
import { OptionsComponent } from "./options.component";
17+
import { OptionsDefaultComponent } from "./options-default.component";
18+
import { AnimateChildComponent } from "./animate-child.component";
19+
import { SelectorAllComponent } from "./selector-all.component";
20+
import { QueryStaggerComponent } from "./query-stagger.component";
21+
1222
import { AppComponent } from "./app.component";
1323

1424
@NgModule({
@@ -17,7 +27,15 @@ import { AppComponent } from "./app.component";
1727
],
1828
declarations: [
1929
AppComponent,
20-
...routedComponents,
30+
AnimationsListComponent,
31+
AnimationBuilderComponent,
32+
ExternalAnimationComponent,
33+
FadeInOutComponent,
34+
OptionsComponent,
35+
OptionsDefaultComponent,
36+
AnimateChildComponent,
37+
SelectorAllComponent,
38+
QueryStaggerComponent,
2139
],
2240
imports: [
2341
NativeScriptModule,

Diff for: e2e/animation-examples/app/app.routing.ts

+1-13
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,11 @@ const routes: Routes = [
2323
{ path: "animate-child", component: AnimateChildComponent },
2424
{ path: "selector", component: SelectorAllComponent },
2525
{ path: "query-stagger", component: QueryStaggerComponent },
26-
{ path: "hero", loadChildren: "./hero/hero.module#HeroModule" },
26+
{ path: "hero", loadChildren: () => import("./hero/hero.module").then(m => m.HeroModule) },
2727
];
2828

2929
@NgModule({
3030
imports: [NativeScriptRouterModule.forRoot(routes)],
3131
exports: [NativeScriptRouterModule],
3232
})
3333
export class AppRoutingModule { }
34-
35-
export const routedComponents = [
36-
AnimationsListComponent,
37-
AnimationBuilderComponent,
38-
ExternalAnimationComponent,
39-
FadeInOutComponent,
40-
OptionsComponent,
41-
OptionsDefaultComponent,
42-
AnimateChildComponent,
43-
SelectorAllComponent,
44-
QueryStaggerComponent,
45-
];

Diff for: e2e/animation-examples/app/main.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { platformNativeScriptDynamic } from "@nativescript/angular/platform";
22
import { animationsTraceCategory } from "@nativescript/angular/trace";
3-
import { setCategories, enable } from "trace";
3+
import { setCategories, enable } from "@nativescript/core/trace";
44

55
import { AppModule } from "./app.module";
66

Diff for: e2e/animation-examples/ngcc.config.js

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
module.exports = {
2+
packages: {
3+
"@nativescript/angular": {
4+
entryPoints: {
5+
".": {
6+
override: {
7+
main: "./index.js",
8+
typings: "./index.d.ts",
9+
},
10+
ignoreMissingDependencies: true,
11+
}
12+
},
13+
ignorableDeepImportMatchers: [
14+
/tns-core-modules\//,
15+
/@nativescript\/core\//,
16+
]
17+
}
18+
}
19+
};

Diff for: e2e/animation-examples/package.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,15 @@
4747
"typescript": "~3.8.3"
4848
},
4949
"scripts": {
50+
"clean": "npx rimraf hooks node_modules package-lock.json",
51+
"setup": "cd ../../nativescript-angular && npm run pack && cd ../e2e/animation-examples && npm run clean",
5052
"u": "update-ns-webpack",
5153
"e2e": "tsc -p e2e && mocha --opts ../config/mocha.opts --recursive e2e --appiumCapsLocation ../config/appium.capabilities.json",
5254
"e2e-watch": "tsc -p e2e --watch",
5355
"update-app-ng-deps": "update-app-ng-deps",
5456
"ns-verify-bundle": "ns-verify-bundle",
55-
"update-ns-webpack": "update-ns-webpack"
57+
"update-ns-webpack": "update-ns-webpack",
58+
"ngcc": "ngcc --properties es2015 module main --first-only",
59+
"postinstall": "npm run ngcc"
5660
}
5761
}

Diff for: e2e/animation-examples/tsconfig.json

+2-8
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,10 @@
2222
]
2323
}
2424
},
25-
"include": [
26-
"../../nativescript-angular-package",
27-
"../../nativescript-angular",
28-
"**/*"
25+
"files": [
26+
"./app/main.ts"
2927
],
3028
"exclude": [
31-
"../../nativescript-angular-package/node_modules",
32-
"../../nativescript-angular-package/**/*.d.ts",
33-
"../../nativescript-angular/node_modules",
34-
"../../nativescript-angular/**/*.d.ts",
3529
"node_modules",
3630
"platforms",
3731
"**/*.aot",

Diff for: e2e/modal-navigation-ng/app/modal-second/modal-second.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { RouterExtensions } from "@nativescript/angular/router";
1111
export class ModalSecondComponent {
1212
constructor(private routerExtension: RouterExtensions, private activeRoute: ActivatedRoute) { }
1313

14-
onLoaded() {
14+
onLoaded(args) {
1515
console.log("modal-second loaded");
1616
}
1717

Diff for: e2e/modal-navigation-ng/app/navigation/basic.navigation.component.ts

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import { confirm } from "@nativescript/core/ui/dialogs";
88
import { ViewContainerRefService } from "../shared/ViewContainerRefService";
99
import { ModalViewComponent } from "~/modal-shared/modal-view.component";
1010

11+
declare var UIModalPresentationStyle;
12+
1113
@Component({
1214
selector: "basic-nav",
1315
template: `

Diff for: e2e/modal-navigation-ng/app/navigation/root.section.component.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,22 @@ import { AppModule } from "../app.module";
99
export class RootSectionComponent {
1010
constructor() { }
1111

12-
onFrameRootViewReset(showModal) {
12+
onFrameRootViewReset(showModal?: boolean) {
1313
AppModule.root = showModal ? "page-router-modal" : "page-router";
1414
AppModule.platformRef._livesync();
1515
}
1616

17-
onNamedFrameRootViewReset(showModal) {
17+
onNamedFrameRootViewReset(showModal?: boolean) {
1818
AppModule.root = showModal ? "named-page-router-modal" : "named-page-router";
1919
AppModule.platformRef._livesync();
2020
}
2121

22-
onTabRootViewReset(showModal) {
22+
onTabRootViewReset(showModal?: boolean) {
2323
AppModule.root = showModal ? "tab-modal" : "tab";
2424
AppModule.platformRef._livesync();
2525
}
2626

27-
onLayoutRootViewReset(showModal) {
27+
onLayoutRootViewReset(showModal?: boolean) {
2828
AppModule.root = showModal ? "layout-modal" : "layout";
2929
AppModule.platformRef._livesync();
3030
}

Diff for: e2e/modal-navigation-ng/ngcc.config.js

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
module.exports = {
2+
packages: {
3+
"@nativescript/angular": {
4+
entryPoints: {
5+
".": {
6+
override: {
7+
main: "./index.js",
8+
typings: "./index.d.ts",
9+
},
10+
ignoreMissingDependencies: true,
11+
}
12+
},
13+
ignorableDeepImportMatchers: [
14+
/tns-core-modules\//,
15+
/@nativescript\/core\//,
16+
]
17+
}
18+
}
19+
};

Diff for: e2e/modal-navigation-ng/package.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@
4848
},
4949
"scripts": {
5050
"e2e": "tsc -p e2e && mocha --opts ../config/mocha.opts --recursive e2e --appiumCapsLocation ../config/appium.capabilities.json",
51-
"e2e-watch": "tsc -p e2e --watch"
51+
"e2e-watch": "tsc -p e2e --watch",
52+
"clean": "npx rimraf hooks node_modules package-lock.json",
53+
"setup": "cd ../../nativescript-angular && npm run pack && cd ../e2e/animation-examples && npm run clean",
54+
"ngcc": "ngcc --properties es2015 module main --first-only",
55+
"postinstall": "npm run ngcc"
5256
}
5357
}

Diff for: e2e/modal-navigation-ng/references.d.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
/// <reference path="./node_modules/tns-platform-declarations/ios.d.ts" />
1+
/// <reference path="./node_modules/tns-platform-declarations/ios.d.ts" />
2+
/// <reference path="./node_modules/tns-platform-declarations/android.d.ts" />

Diff for: e2e/modal-navigation-ng/tsconfig.json

+32-38
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,34 @@
11
{
2-
"compilerOptions": {
3-
"module": "commonjs",
4-
"target": "es5",
5-
"experimentalDecorators": true,
6-
"emitDecoratorMetadata": true,
7-
"noEmitHelpers": true,
8-
"noEmitOnError": true,
9-
"skipLibCheck": true,
10-
"lib": [
11-
"es2017",
12-
"dom",
13-
"es6"
14-
],
15-
"baseUrl": ".",
16-
"paths": {
17-
"~/*": [
18-
"app/*"
19-
],
20-
"*": [
21-
"./node_modules/*"
22-
]
23-
}
24-
},
25-
"include": [
26-
"../../nativescript-angular-package",
27-
"../../nativescript-angular",
28-
"**/*"
29-
],
30-
"exclude": [
31-
"../../nativescript-angular-package/node_modules",
32-
"../../nativescript-angular-package/**/*.d.ts",
33-
"../../nativescript-angular/node_modules",
34-
"../../nativescript-angular/**/*.d.ts",
35-
"node_modules",
36-
"platforms",
37-
"**/*.aot",
38-
"e2e"
39-
]
2+
"compilerOptions": {
3+
"module": "commonjs",
4+
"target": "es5",
5+
"experimentalDecorators": true,
6+
"emitDecoratorMetadata": true,
7+
"noEmitHelpers": true,
8+
"noEmitOnError": true,
9+
"skipLibCheck": true,
10+
"lib": [
11+
"es2017",
12+
"dom",
13+
"es6"
14+
],
15+
"baseUrl": ".",
16+
"paths": {
17+
"~/*": [
18+
"app/*"
19+
]
20+
}
21+
},
22+
"includes": [
23+
"./references.d.ts"
24+
],
25+
"files": [
26+
"./app/main.ts"
27+
],
28+
"exclude": [
29+
"node_modules",
30+
"platforms",
31+
"**/*.aot",
32+
"e2e"
33+
]
4034
}

Diff for: e2e/routable-animations/app/app.module.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { HomeComponent } from './home/home.component';
88
import { SupportComponent } from './support/support.component';
99

1010
import { animationsTraceCategory } from "@nativescript/angular/trace";
11-
import { setCategories, enable } from "trace";
11+
import { setCategories, enable } from "@nativescript/core/trace";
1212
setCategories(animationsTraceCategory);
1313
enable();
1414

Diff for: nativescript-angular/.npmignore

-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
*.ts
44
!*.d.ts
55

6-
*.js.map
7-
86
tsconfig.json
97
global.d.ts
108
.npmignore

0 commit comments

Comments
 (0)