Skip to content

Commit c2be4bd

Browse files
authored
feat(angular): v10 support (#162)
1 parent a7c2793 commit c2be4bd

File tree

11 files changed

+64
-46
lines changed

11 files changed

+64
-46
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ node_modules/
88
platforms/
99
tmp/
1010
typings/
11+
*.tgz
1112

1213
.idea
1314
.cloud

packages/template-hello-world-ng/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ typings/
1515
.cloud
1616
.project
1717
.vscode
18+
*.tgz

packages/template-hello-world-ng/.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ typings/
1616
.project
1717
.vscode
1818
.npmrc
19+
*.tgz
1920

2021
tools/assets/

packages/template-hello-world-ng/ngcc.config.js

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,36 @@
1+
/**
2+
* As a convenience we've added several common plugins in case your project ends up using them.
3+
* Once the listed plugins have been built and distributed with ng-packagr they can be removed from here safely.
4+
*/
15
module.exports = {
26
packages: {
3-
"@nativescript/angular": {
7+
"nativescript-localize": {
48
entryPoints: {
59
".": {
10+
override: {
11+
main: "./angular.js",
12+
typings: "./angular.d.ts",
13+
},
14+
ignoreMissingDependencies: true,
15+
},
16+
},
17+
ignorableDeepImportMatchers: [
18+
/tns-core-modules\//,
19+
/@nativescript\/core\//,
20+
/@nativescript\/angular\//,
21+
/nativescript-angular\//,
22+
]
23+
},
24+
"nativescript-datetimepicker": {
25+
entryPoints: {
26+
".": {
27+
override: {
28+
main: "./index.js",
29+
typings: "./index.d.ts",
30+
},
31+
ignoreMissingDependencies: true,
32+
},
33+
"angular": {
634
override: {
735
main: "./index.js",
836
typings: "./index.d.ts",
@@ -13,6 +41,8 @@ module.exports = {
1341
ignorableDeepImportMatchers: [
1442
/tns-core-modules\//,
1543
/@nativescript\/core\//,
44+
/@nativescript\/angular\//,
45+
/nativescript-angular\//,
1646
]
1747
}
1848
}

packages/template-hello-world-ng/package.json

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
"id": "org.nativescript.HelloWorld",
44
"templateVersion": "v2",
55
"tns-android": {
6-
"version": "6.5.0"
6+
"version": "6.5.3"
77
},
88
"tns-ios": {
9-
"version": "6.5.0"
9+
"version": "6.5.2"
1010
}
1111
},
12-
"name": "tns-template-hello-world-ng",
13-
"version": "6.6.5",
12+
"name": "@nativescript/template-hello-world-ng",
13+
"version": "6.7.0",
1414
"author": "NativeScript Team <[email protected]>",
1515
"description": "NativeScript Angular Hello World template",
1616
"license": "Apache-2.0",
@@ -31,30 +31,31 @@
3131
"url": "https://github.com/NativeScript/NativeScript/issues"
3232
},
3333
"scripts": {
34+
"clean": "npx rimraf hooks node_modules package-lock.json platforms",
3435
"ngcc": "ngcc --properties es2015 module main --first-only",
3536
"postinstall": "npm run ngcc"
3637
},
3738
"dependencies": {
38-
"@angular/animations": "~9.1.0",
39-
"@angular/common": "~9.1.0",
40-
"@angular/compiler": "~9.1.0",
41-
"@angular/core": "~9.1.0",
42-
"@angular/forms": "~9.1.0",
43-
"@angular/platform-browser": "~9.1.0",
44-
"@angular/platform-browser-dynamic": "~9.1.0",
45-
"@angular/router": "~9.1.0",
46-
"@nativescript/angular": "~9.0.0",
39+
"@angular/animations": "~10.0.0",
40+
"@angular/common": "~10.0.0",
41+
"@angular/compiler": "~10.0.0",
42+
"@angular/core": "~10.0.0",
43+
"@angular/forms": "~10.0.0",
44+
"@angular/platform-browser": "~10.0.0",
45+
"@angular/platform-browser-dynamic": "~10.0.0",
46+
"@angular/router": "~10.0.0",
47+
"@nativescript/angular": "~10.0.0",
48+
"@nativescript/core": "rc",
4749
"@nativescript/theme": "~2.3.0",
4850
"reflect-metadata": "~0.1.12",
4951
"rxjs": "^6.5.0",
50-
"tns-core-modules": "~6.5.0",
5152
"zone.js": "~0.10.3"
5253
},
5354
"devDependencies": {
54-
"@angular/compiler-cli": "~9.1.0",
55-
"@ngtools/webpack": "~9.1.0",
56-
"nativescript-dev-webpack": "~1.5.0",
57-
"tns-platform-declarations": "~6.5.0",
58-
"typescript": "~3.8.3"
55+
"@angular/compiler-cli": "~10.0.0",
56+
"@nativescript/types": "rc",
57+
"@nativescript/webpack": "~2.0.0",
58+
"@ngtools/webpack": "~10.0.0",
59+
"typescript": "~3.9.0"
5960
}
6061
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
/// <reference path="./node_modules/tns-platform-declarations/ios.d.ts" />
2-
/// <reference path="./node_modules/tns-platform-declarations/android.d.ts" />
1+
/// <reference path="./node_modules/@nativescript/types/ios.d.ts" />
2+
/// <reference path="./node_modules/@nativescript/types/android.d.ts" />
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
<!-- https://docs.nativescript.org/angular/core-concepts/angular-navigation.html#page-router-outlet -->
2-
<page-router-outlet></page-router-outlet>
1+
<GridLayout>
2+
<page-router-outlet></page-router-outlet>
3+
</GridLayout>

packages/template-hello-world-ng/src/app/app.module.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@ import { AppComponent } from "./app.component";
66
import { ItemsComponent } from "./item/items.component";
77
import { ItemDetailComponent } from "./item/item-detail.component";
88

9-
// Uncomment and add to NgModule imports if you need to use two-way binding
10-
// import { NativeScriptFormsModule } from "nativescript-angular/forms";
11-
12-
// Uncomment and add to NgModule imports if you need to use the HttpClient wrapper
13-
// import { NativeScriptHttpClientModule } from "nativescript-angular/http-client";
14-
159
@NgModule({
1610
bootstrap: [
1711
AppComponent
@@ -30,7 +24,4 @@ import { ItemDetailComponent } from "./item/item-detail.component";
3024
NO_ERRORS_SCHEMA
3125
]
3226
})
33-
/*
34-
Pass your application module to the bootstrapModule function located in main.ts to start your app
35-
*/
3627
export class AppModule { }

packages/template-hello-world-ng/src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// this import should be first in order to load some required settings (like globals and reflect-metadata)
2-
import { platformNativeScriptDynamic } from "@nativescript/angular/platform";
2+
import { platformNativeScriptDynamic } from "@nativescript/angular";
33

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

packages/template-hello-world-ng/tsconfig.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
{
22
"compilerOptions": {
3-
"module": "commonjs",
4-
"target": "es5",
3+
"module": "ESNext",
4+
"target": "es2015",
5+
"moduleResolution": "node",
56
"experimentalDecorators": true,
67
"emitDecoratorMetadata": true,
78
"noEmitHelpers": true,
89
"noEmitOnError": true,
910
"skipLibCheck": true,
1011
"lib": [
11-
"es2017",
12-
"dom",
13-
"es6"
12+
"es2018", "es2017", "dom", "es6"
1413
],
1514
"baseUrl": ".",
1615
"paths": {

0 commit comments

Comments
 (0)