Skip to content

Commit 1b7783f

Browse files
committed
chore: xplat 13
1 parent fbb5e02 commit 1b7783f

File tree

10 files changed

+262
-2167
lines changed

10 files changed

+262
-2167
lines changed

apps/nativescript-demo-ng/nativescript.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,7 @@ export default {
1414
discardUncaughtJsExceptions: true,
1515
},
1616
appPath: 'src',
17+
cli: {
18+
packageManager: 'npm',
19+
},
1720
} as NativeScriptConfig;

apps/nativescript-demo-ng/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
},
88
"dependencies": {
99
"@nativescript/angular": "file:../../packages/angular",
10-
"@nativescript/core": "~8.1.0"
10+
"@nativescript/core": "file:../../node_modules/@nativescript/core"
1111
},
1212
"devDependencies": {
13-
"@nativescript/android": "8.0.0",
14-
"@nativescript/ios": "8.1.0",
13+
"@nativescript/android": "~8.1.1",
14+
"@nativescript/ios": "~8.1.0",
1515
"@nativescript/unit-test-runner": "^2.0.5"
1616
}
1717
}
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
{
2+
"root": "apps/nativescript-demo-ng/",
3+
"sourceRoot": "apps/nativescript-demo-ng/src",
4+
"projectType": "application",
5+
"prefix": "nativescript",
6+
"generators": {
7+
"@schematics/angular:component": {
8+
"styleext": "scss"
9+
}
10+
},
11+
"targets": {
12+
"build": {
13+
"executor": "@nativescript/nx:build",
14+
"options": {
15+
"noHmr": true,
16+
"production": true,
17+
"uglify": true,
18+
"release": true,
19+
"forDevice": true
20+
},
21+
"configurations": {
22+
"prod": {
23+
"fileReplacements": [
24+
{
25+
"replace": "./src/environments/environment.ts",
26+
"with": "./src/environments/environment.prod.ts"
27+
}
28+
]
29+
}
30+
}
31+
},
32+
"ios": {
33+
"executor": "@nativescript/nx:build",
34+
"options": {
35+
"platform": "ios"
36+
},
37+
"configurations": {
38+
"build": {
39+
"copyTo": "./dist/build.ipa"
40+
},
41+
"prod": {
42+
"combineWithConfig": "build:prod"
43+
}
44+
}
45+
},
46+
"android": {
47+
"executor": "@nativescript/nx:build",
48+
"options": {
49+
"platform": "android"
50+
},
51+
"configurations": {
52+
"build": {
53+
"copyTo": "./dist/build.apk"
54+
},
55+
"prod": {
56+
"combineWithConfig": "build:prod"
57+
}
58+
}
59+
},
60+
"clean": {
61+
"executor": "@nativescript/nx:build",
62+
"options": {
63+
"clean": true
64+
}
65+
},
66+
"lint": {
67+
"executor": "@nrwl/linter:eslint",
68+
"options": {
69+
"lintFilePatterns": ["apps/nativescript-demo-ng/**/*.ts", "apps/nativescript-demo-ng/src/**/*.html"]
70+
}
71+
},
72+
"test": {
73+
"executor": "@nrwl/jest:jest",
74+
"options": {
75+
"jestConfig": "apps/nativescript-demo-ng/jest.config.js",
76+
"tsConfig": "apps/nativescript-demo-ng/tsconfig.spec.json",
77+
"passWithNoTests": true,
78+
"setupFile": "apps/nativescript-demo-ng/src/test-setup.ts"
79+
}
80+
}
81+
},
82+
"tags": []
83+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
import 'jest-preset-angular';
1+
import 'jest-preset-angular/setup-jest';

apps/nativescript-demo-ng/tools/xplat-postinstall.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@ const childProcess = require('child_process');
77
// Copy potential hooks from root dependencies to app
88
const hooksSrc = '../../hooks';
99
const hooksDest = 'hooks';
10+
console.info('Copying ' + hooksSrc + ' -> ' + hooksDest);
1011
try {
1112
fs.copySync(hooksSrc, hooksDest);
1213
} catch (err) {
1314
// ignore
1415
}
1516

1617
// Helpful to trigger ngcc after an install to ensure all has processed properly
17-
const ngccPath = path.join('..', '..', 'node_modules', '.bin', 'ngcc');
18+
const ngccPath = require.resolve('@angular/compiler-cli/ngcc/main-ngcc.js');
1819
const child = childProcess.spawn(ngccPath, ['--tsconfig', 'tsconfig.app.json', '--properties', 'es2015', 'module', 'main', '--first-only'], {
1920
cwd: process.cwd(),
20-
stdio: 'inherit',
21-
shell: process.platform == 'win32'
21+
shell: process.platform == 'win32',
2222
});
23-
child.on('close', (code) => {
24-
23+
child.stdout.setEncoding('utf8');
24+
child.stdout.on('data', function (data) {
25+
console.log(data);
2526
});
26-

package.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@
4343
"@nativescript/theme": "~3.0.0",
4444
"nativescript-ngx-fonticon": "~7.0.0",
4545
"rxjs": "^7.3.0",
46-
"zone.js": "0.11.4"
46+
"zone.js": "0.11.4",
47+
"@nativescript/angular": "^12.2.0",
48+
"@ngx-translate/core": "~13.0.0"
4749
},
4850
"devDependencies": {
4951
"@angular-eslint/eslint-plugin": "12.3.1",
@@ -52,7 +54,7 @@
5254
"@angular/compiler-cli": "12.2.5",
5355
"@nativescript/types": "~8.1.0",
5456
"@nativescript/unit-test-runner": "^2.0.5",
55-
"@nativescript/webpack": "5.0.0",
57+
"@nativescript/webpack": "~5.0.0",
5658
"@ngtools/webpack": "12.2.5",
5759
"@nrwl/angular": "13.1.3",
5860
"@nrwl/cli": "13.1.3",
@@ -61,10 +63,10 @@
6163
"@nrwl/node": "13.1.3",
6264
"@nrwl/tao": "13.1.3",
6365
"@nrwl/workspace": "13.1.3",
64-
"@nstudio/angular": "12.7.0",
65-
"@nstudio/nativescript": "12.7.0",
66-
"@nstudio/nativescript-angular": "12.7.0",
67-
"@nstudio/xplat": "12.7.0",
66+
"@nstudio/angular": "13.0.1",
67+
"@nstudio/nativescript": "13.0.1",
68+
"@nstudio/nativescript-angular": "13.0.1",
69+
"@nstudio/xplat": "13.0.1",
6870
"@types/jasmine": "^3.7.2",
6971
"@types/jest": "27.0.2",
7072
"@types/node": "14.14.33",

packages/angular/project.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"root": "packages/angular",
3+
"sourceRoot": "packages/angular/src",
4+
"projectType": "library",
5+
"generators": {},
6+
"targets": {
7+
"build": {
8+
"executor": "@nrwl/workspace:run-commands",
9+
"outputs": ["dist/packages"],
10+
"options": {
11+
"commands": ["node tools/scripts/build-angular.ts angular"],
12+
"parallel": false
13+
}
14+
},
15+
"lint": {
16+
"executor": "@nrwl/linter:eslint",
17+
"options": {
18+
"lintFilePatterns": ["packages/angular/**/*.ts", "packages/angular/src/**/*.html"]
19+
}
20+
},
21+
"test": {
22+
"executor": "@nrwl/jest:jest",
23+
"options": {
24+
"jestConfig": "packages/angular/jest.config.js",
25+
"passWithNoTests": true
26+
},
27+
"outputs": ["coverage/packages/angular"]
28+
}
29+
},
30+
"tags": []
31+
}

packages/zone-js/project.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"root": "packages/zone-js",
3+
"sourceRoot": "packages/zone-js/src",
4+
"projectType": "library",
5+
"targets": {
6+
"build": {
7+
"executor": "@nrwl/node:package",
8+
"options": {
9+
"outputPath": "dist/packages/zone-js",
10+
"tsConfig": "packages/zone-js/tsconfig.lib.json",
11+
"packageJson": "packages/zone-js/package.json",
12+
"main": "packages/zone-js/dist/index.ts",
13+
"assets": ["packages/zone-js/*.md"]
14+
}
15+
},
16+
"lint": {
17+
"executor": "@nrwl/linter:eslint",
18+
"options": {
19+
"lintFilePatterns": ["packages/zone-js/**/*.ts"]
20+
}
21+
},
22+
"test": {
23+
"executor": "@nrwl/jest:jest",
24+
"outputs": ["coverage/packages/zone-js"],
25+
"options": {
26+
"jestConfig": "packages/zone-js/jest.config.js",
27+
"passWithNoTests": true
28+
}
29+
}
30+
},
31+
"tags": []
32+
}

workspace.json

Lines changed: 3 additions & 146 deletions
Original file line numberDiff line numberDiff line change
@@ -1,151 +1,8 @@
11
{
22
"version": 2,
33
"projects": {
4-
"angular": {
5-
"root": "packages/angular",
6-
"sourceRoot": "packages/angular/src",
7-
"projectType": "library",
8-
"generators": {},
9-
"targets": {
10-
"build": {
11-
"executor": "@nrwl/workspace:run-commands",
12-
"outputs": ["dist/packages"],
13-
"options": {
14-
"commands": ["node tools/scripts/build-angular.ts angular"],
15-
"parallel": false
16-
}
17-
},
18-
"lint": {
19-
"executor": "@nrwl/linter:eslint",
20-
"options": {
21-
"lintFilePatterns": ["packages/angular/**/*.ts", "packages/angular/src/**/*.html"]
22-
}
23-
},
24-
"test": {
25-
"executor": "@nrwl/jest:jest",
26-
"options": {
27-
"jestConfig": "packages/angular/jest.config.js",
28-
"passWithNoTests": true
29-
},
30-
"outputs": ["coverage/packages/angular"]
31-
}
32-
},
33-
"tags": []
34-
},
35-
"nativescript-demo-ng": {
36-
"root": "apps/nativescript-demo-ng/",
37-
"sourceRoot": "apps/nativescript-demo-ng/src",
38-
"projectType": "application",
39-
"prefix": "nativescript",
40-
"generators": {
41-
"@schematics/angular:component": {
42-
"styleext": "scss"
43-
}
44-
},
45-
"targets": {
46-
"build": {
47-
"executor": "@nativescript/nx:build",
48-
"options": {
49-
"noHmr": true,
50-
"production": true,
51-
"uglify": true,
52-
"release": true,
53-
"forDevice": true
54-
},
55-
"configurations": {
56-
"prod": {
57-
"fileReplacements": [
58-
{
59-
"replace": "./src/environments/environment.ts",
60-
"with": "./src/environments/environment.prod.ts"
61-
}
62-
]
63-
}
64-
}
65-
},
66-
"ios": {
67-
"executor": "@nativescript/nx:build",
68-
"options": {
69-
"platform": "ios"
70-
},
71-
"configurations": {
72-
"build": {
73-
"copyTo": "./dist/build.ipa"
74-
},
75-
"prod": {
76-
"combineWithConfig": "build:prod"
77-
}
78-
}
79-
},
80-
"android": {
81-
"executor": "@nativescript/nx:build",
82-
"options": {
83-
"platform": "android"
84-
},
85-
"configurations": {
86-
"build": {
87-
"copyTo": "./dist/build.apk"
88-
},
89-
"prod": {
90-
"combineWithConfig": "build:prod"
91-
}
92-
}
93-
},
94-
"clean": {
95-
"executor": "@nativescript/nx:build",
96-
"options": {
97-
"clean": true
98-
}
99-
},
100-
"lint": {
101-
"executor": "@nrwl/linter:eslint",
102-
"options": {
103-
"lintFilePatterns": ["apps/nativescript-demo-ng/**/*.ts", "apps/nativescript-demo-ng/src/**/*.html"]
104-
}
105-
},
106-
"test": {
107-
"executor": "@nrwl/jest:jest",
108-
"options": {
109-
"jestConfig": "apps/nativescript-demo-ng/jest.config.js",
110-
"tsConfig": "apps/nativescript-demo-ng/tsconfig.spec.json",
111-
"passWithNoTests": true,
112-
"setupFile": "apps/nativescript-demo-ng/src/test-setup.ts"
113-
}
114-
}
115-
},
116-
"tags": []
117-
},
118-
"zone-js": {
119-
"root": "packages/zone-js",
120-
"sourceRoot": "packages/zone-js/src",
121-
"projectType": "library",
122-
"targets": {
123-
"build": {
124-
"executor": "@nrwl/node:package",
125-
"options": {
126-
"outputPath": "dist/packages/zone-js",
127-
"tsConfig": "packages/zone-js/tsconfig.lib.json",
128-
"packageJson": "packages/zone-js/package.json",
129-
"main": "packages/zone-js/dist/index.ts",
130-
"assets": ["packages/zone-js/*.md"]
131-
}
132-
},
133-
"lint": {
134-
"executor": "@nrwl/linter:eslint",
135-
"options": {
136-
"lintFilePatterns": ["packages/zone-js/**/*.ts"]
137-
}
138-
},
139-
"test": {
140-
"executor": "@nrwl/jest:jest",
141-
"outputs": ["coverage/packages/zone-js"],
142-
"options": {
143-
"jestConfig": "packages/zone-js/jest.config.js",
144-
"passWithNoTests": true
145-
}
146-
}
147-
},
148-
"tags": []
149-
}
4+
"angular": "packages/angular",
5+
"nativescript-demo-ng": "apps/nativescript-demo-ng",
6+
"zone-js": "packages/zone-js"
1507
}
1518
}

0 commit comments

Comments
 (0)