Skip to content

Commit ae00564

Browse files
author
Elena Hristova
committed
chore: update apps structure for 6.0
1 parent 3363e09 commit ae00564

File tree

189 files changed

+21
-74
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

189 files changed

+21
-74
lines changed

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

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
"mochawesome": "~3.1.2",
4444
"nativescript-css-loader": "~0.26.0",
4545
"nativescript-dev-appium": "next",
46-
"nativescript-dev-typescript": "next",
4746
"nativescript-dev-webpack": "next",
4847
"typescript": "~3.4.5"
4948
},

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

+1-9
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,7 @@
44
"readme": "NativeScript Application",
55
"repository": "<fill-your-repository-here>",
66
"nativescript": {
7-
"id": "org.nativescript.modalnavigationng",
8-
"tns-android": {
9-
"version": "next"
10-
},
11-
"tns-ios": {
12-
"version": "next"
13-
}
7+
"id": "org.nativescript.modalnavigationng"
148
},
159
"dependencies": {
1610
"@angular/animations": "~8.0.0",
@@ -23,7 +17,6 @@
2317
"@angular/platform-browser-dynamic": "~8.0.0",
2418
"@angular/router": "~8.0.0",
2519
"nativescript-angular": "file:../../nativescript-angular",
26-
"nativescript-dev-webpack": "next",
2720
"nativescript-theme-core": "~1.0.4",
2821
"reflect-metadata": "~0.1.8",
2922
"rxjs": "~6.3.3",
@@ -43,7 +36,6 @@
4336
"mocha": "~5.2.0",
4437
"mochawesome": "~3.1.2",
4538
"nativescript-dev-appium": "next",
46-
"nativescript-dev-typescript": "next",
4739
"nativescript-dev-webpack": "next",
4840
"tns-platform-declarations": "next",
4941
"typescript": "~3.4.5"

Diff for: e2e/nested-router-tab-view/package.json

+1-9
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,7 @@
44
"readme": "NativeScript Application",
55
"repository": "<fill-your-repository-here>",
66
"nativescript": {
7-
"id": "org.nativescript.nestedroutertabview",
8-
"tns-ios": {
9-
"version": "next"
10-
},
11-
"tns-android": {
12-
"version": "next"
13-
}
7+
"id": "org.nativescript.nestedroutertabview"
148
},
159
"dependencies": {
1610
"@angular/animations": "~8.0.0",
@@ -23,7 +17,6 @@
2317
"@angular/platform-browser-dynamic": "~8.0.0",
2418
"@angular/router": "~8.0.0",
2519
"nativescript-angular": "file:../../nativescript-angular",
26-
"nativescript-dev-webpack": "next",
2720
"nativescript-theme-core": "~1.0.4",
2821
"reflect-metadata": "~0.1.8",
2922
"rxjs": "~6.3.3",
@@ -43,7 +36,6 @@
4336
"mocha": "~5.2.0",
4437
"mochawesome": "~3.1.2",
4538
"nativescript-dev-appium": "next",
46-
"nativescript-dev-typescript": "next",
4739
"nativescript-dev-webpack": "next",
4840
"typescript": "3.4.5"
4941
},

Diff for: e2e/renderer/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
"mocha": "~5.2.0",
3838
"mochawesome": "~3.1.2",
3939
"nativescript-dev-appium": "next",
40-
"nativescript-dev-typescript": "next",
4140
"nativescript-dev-webpack": "next",
4241
"tslib": "^1.7.1",
4342
"typescript": "~3.4.5"

Diff for: e2e/routable-animations/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"nativescript-theme-core": "~1.0.2",
2121
"reflect-metadata": "~0.1.8",
2222
"rxjs": "~6.0.0 || >=6.1.0",
23-
"tns-core-modules": "^4.0.0",
23+
"tns-core-modules": "6.0.1",
2424
"zone.js": "^0.9.1"
2525
},
2626
"devDependencies": {
@@ -36,7 +36,6 @@
3636
"lazy": "1.0.11",
3737
"nativescript-css-loader": "~0.26.0",
3838
"nativescript-dev-appium": "^4.0.0",
39-
"nativescript-dev-typescript": "~0.7.1",
4039
"nativescript-dev-webpack": "next",
4140
"typescript": "~3.4.5"
4241
},

Diff for: e2e/router-tab-view/package.json

+1-8
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,7 @@
44
"readme": "NativeScript Application",
55
"repository": "<fill-your-repository-here>",
66
"nativescript": {
7-
"id": "org.nativescript.routertabview",
8-
"tns-android": {
9-
"version": "next"
10-
},
11-
"tns-ios": {
12-
"version": "next"
13-
}
7+
"id": "org.nativescript.routertabview"
148
},
159
"dependencies": {
1610
"@angular/animations": "~8.0.0",
@@ -41,7 +35,6 @@
4135
"mocha": "~5.2.0",
4236
"mochawesome": "~3.1.2",
4337
"nativescript-dev-appium": "next",
44-
"nativescript-dev-typescript": "next",
4538
"typescript": "~3.4.5",
4639
"@angular/compiler-cli": "8.0.0",
4740
"@ngtools/webpack": "8.0.0"

Diff for: e2e/router/package.json

+1-5
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@
44
"readme": "NativeScript Application",
55
"repository": "<fill-your-repository-here>",
66
"nativescript": {
7-
"id": "org.nativescript.router",
8-
"tns-android": {
9-
"version": "next"
10-
}
7+
"id": "org.nativescript.router"
118
},
129
"dependencies": {
1310
"@angular/animations": "~8.0.0",
@@ -41,7 +38,6 @@
4138
"mocha": "~5.2.0",
4239
"mochawesome": "~3.1.2",
4340
"nativescript-dev-appium": "next",
44-
"nativescript-dev-typescript": "next",
4541
"nativescript-dev-webpack": "next",
4642
"tslib": "^1.7.1",
4743
"typescript": "~3.4.5"

Diff for: e2e/single-page/package.json

+1-8
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,7 @@
44
"readme": "NativeScript Application",
55
"repository": "<fill-your-repository-here>",
66
"nativescript": {
7-
"id": "org.nativescript.singlepage",
8-
"tns-ios": {
9-
"version": "next"
10-
},
11-
"tns-android": {
12-
"version": "next"
13-
}
7+
"id": "org.nativescript.singlepage"
148
},
159
"dependencies": {
1610
"@angular/animations": "~8.0.0",
@@ -44,7 +38,6 @@
4438
"mocha": "~5.2.0",
4539
"mochawesome": "~3.1.2",
4640
"nativescript-dev-appium": "next",
47-
"nativescript-dev-typescript": "next",
4841
"nativescript-dev-webpack": "next",
4942
"tslib": "^1.7.1",
5043
"typescript": "~3.4.5"

Diff for: e2e/tests-app-ng/package.json

+5-9
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,7 @@
44
"readme": "NativeScript Application",
55
"repository": "<fill-your-repository-here>",
66
"nativescript": {
7-
"id": "org.nativescript.testsappng",
8-
"tns-ios": {
9-
"version": "next"
10-
},
11-
"tns-android": {
12-
"version": "next"
13-
}
7+
"id": "org.nativescript.testsappng"
148
},
159
"dependencies": {
1610
"@angular/common": "~8.0.0",
@@ -35,9 +29,11 @@
3529
"codelyzer": "^4.0.0",
3630
"filewalker": "^0.1.3",
3731
"lazy": "1.0.11",
38-
"nativescript-dev-typescript": "next",
3932
"nativescript-dev-webpack": "next",
40-
"tslint": "^5.4.3"
33+
"tslint": "^5.4.3",
34+
"typescript": "~3.4.5",
35+
"@angular/compiler-cli": "~8.0.0",
36+
"@ngtools/webpack": "~8.0.0"
4137
},
4238
"scripts": {
4339
"tslint": "tslint --config tslint.json 'app/**/*.ts'",

Diff for: ng-sample/package.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
{
22
"nativescript": {
3-
"id": "org.nativescript.ngsample",
4-
"tns-android": {
5-
"version": "next"
6-
},
7-
"tns-ios": {
8-
"version": "next"
9-
}
3+
"id": "org.nativescript.ngsample"
104
},
115
"name": "tns-template-hello-world",
126
"main": "app.js",

Diff for: tests/nsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"useLegacyWorkflow": false,
32
"appPath": "app",
43
"appResourcesPath": "app/App_Resources"
54
}

Diff for: tests/package.json

+1-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
{
22
"nativescript": {
3-
"id": "org.nativescript.ngtests",
4-
"tns-ios": {
5-
"version": "next"
6-
},
7-
"tns-android": {
8-
"version": "next"
9-
}
3+
"id": "org.nativescript.ngtests"
104
},
115
"name": "ngtests",
126
"version": "1.0.0",
@@ -60,7 +54,6 @@
6054
"karma-webpack": "3.0.5",
6155
"lazy": "1.0.11",
6256
"mocha": "6.1.4",
63-
"nativescript-dev-typescript": "next",
6457
"nativescript-dev-webpack": "next",
6558
"remove-strict-webpack-plugin": "~0.1.2",
6659
"sinon": "^7.3.2",

Diff for: tests/webpack.config.js

+8-6
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,13 @@ module.exports = env => {
3232

3333
// Default destination inside platforms/<platform>/...
3434
const dist = resolve(projectRoot, nsWebpack.getAppPath(platform, projectRoot));
35-
const appResourcesPlatformDir = platform === "android" ? "Android" : "iOS";
3635

3736
const {
3837
// The 'appPath' and 'appResourcesPath' values are fetched from
3938
// the nsconfig.json configuration file
4039
// when bundling with `tns run android|ios --bundle`.
41-
appPath = "app",
42-
appResourcesPath = "app/App_Resources",
40+
appPath = "src",
41+
appResourcesPath = "App_Resources",
4342

4443
// You can provide the following flags when running 'tns run android|ios'
4544
aot, // --env.aot
@@ -62,8 +61,9 @@ module.exports = env => {
6261
const entryModule = `${nsWebpack.getEntryModule(appFullPath, platform)}.ts`;
6362
const entryPath = `.${sep}${entryModule}`;
6463
const entries = { bundle: entryPath };
65-
if (platform === "ios") {
66-
entries["tns_modules/tns-core-modules/inspector_modules"] = "inspector_modules.js";
64+
const areCoreModulesExternal = Array.isArray(env.externals) && env.externals.some(e => e.indexOf("tns-core-modules") > -1);
65+
if (platform === "ios" && !areCoreModulesExternal) {
66+
entries["tns_modules/tns-core-modules/inspector_modules"] = "inspector_modules";
6767
};
6868

6969
const ngCompilerTransformers = [];
@@ -108,6 +108,7 @@ module.exports = env => {
108108
itemsToClean.push(`${join(projectRoot, "platforms", "android", "app", "build", "configurations", "nativescript-android-snapshot")}`);
109109
}
110110

111+
nsWebpack.processAppComponents(appComponents, platform);
111112
const config = {
112113
mode: production ? "production" : "development",
113114
context: appFullPath,
@@ -212,6 +213,7 @@ module.exports = env => {
212213
unitTesting,
213214
appFullPath,
214215
projectRoot,
216+
ignoredFiles: nsWebpack.getUserDefinedEntries(entries, platform)
215217
}
216218
},
217219
].filter(loader => !!loader)
@@ -261,7 +263,7 @@ module.exports = env => {
261263
// Define useful constants like TNS_WEBPACK
262264
new webpack.DefinePlugin({
263265
"global.TNS_WEBPACK": "true",
264-
"process": undefined,
266+
"process": "global.process",
265267
}),
266268
// Remove all files from the out dir.
267269
new CleanWebpackPlugin(itemsToClean, { verbose: !!verbose }),

0 commit comments

Comments
 (0)