Skip to content

chore: update apps for 6.0 #1908

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion e2e/animation-examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"mochawesome": "~3.1.2",
"nativescript-css-loader": "~0.26.0",
"nativescript-dev-appium": "next",
"nativescript-dev-typescript": "next",
"nativescript-dev-webpack": "next",
"typescript": "~3.4.5"
},
Expand Down
10 changes: 1 addition & 9 deletions e2e/modal-navigation-ng/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@
"readme": "NativeScript Application",
"repository": "<fill-your-repository-here>",
"nativescript": {
"id": "org.nativescript.modalnavigationng",
"tns-android": {
"version": "next"
},
"tns-ios": {
"version": "next"
}
"id": "org.nativescript.modalnavigationng"
},
"dependencies": {
"@angular/animations": "~8.0.0",
Expand All @@ -23,7 +17,6 @@
"@angular/platform-browser-dynamic": "~8.0.0",
"@angular/router": "~8.0.0",
"nativescript-angular": "file:../../nativescript-angular",
"nativescript-dev-webpack": "next",
"nativescript-theme-core": "~1.0.4",
"reflect-metadata": "~0.1.8",
"rxjs": "~6.3.3",
Expand All @@ -43,7 +36,6 @@
"mocha": "~5.2.0",
"mochawesome": "~3.1.2",
"nativescript-dev-appium": "next",
"nativescript-dev-typescript": "next",
"nativescript-dev-webpack": "next",
"tns-platform-declarations": "next",
"typescript": "~3.4.5"
Expand Down
10 changes: 1 addition & 9 deletions e2e/nested-router-tab-view/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@
"readme": "NativeScript Application",
"repository": "<fill-your-repository-here>",
"nativescript": {
"id": "org.nativescript.nestedroutertabview",
"tns-ios": {
"version": "next"
},
"tns-android": {
"version": "next"
}
"id": "org.nativescript.nestedroutertabview"
},
"dependencies": {
"@angular/animations": "~8.0.0",
Expand All @@ -23,7 +17,6 @@
"@angular/platform-browser-dynamic": "~8.0.0",
"@angular/router": "~8.0.0",
"nativescript-angular": "file:../../nativescript-angular",
"nativescript-dev-webpack": "next",
"nativescript-theme-core": "~1.0.4",
"reflect-metadata": "~0.1.8",
"rxjs": "~6.3.3",
Expand All @@ -43,7 +36,6 @@
"mocha": "~5.2.0",
"mochawesome": "~3.1.2",
"nativescript-dev-appium": "next",
"nativescript-dev-typescript": "next",
"nativescript-dev-webpack": "next",
"typescript": "3.4.5"
},
Expand Down
1 change: 0 additions & 1 deletion e2e/renderer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"mocha": "~5.2.0",
"mochawesome": "~3.1.2",
"nativescript-dev-appium": "next",
"nativescript-dev-typescript": "next",
"nativescript-dev-webpack": "next",
"tslib": "^1.7.1",
"typescript": "~3.4.5"
Expand Down
3 changes: 1 addition & 2 deletions e2e/routable-animations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"nativescript-theme-core": "~1.0.2",
"reflect-metadata": "~0.1.8",
"rxjs": "~6.0.0 || >=6.1.0",
"tns-core-modules": "^4.0.0",
"tns-core-modules": "next",
"zone.js": "^0.9.1"
},
"devDependencies": {
Expand All @@ -36,7 +36,6 @@
"lazy": "1.0.11",
"nativescript-css-loader": "~0.26.0",
"nativescript-dev-appium": "^4.0.0",
"nativescript-dev-typescript": "~0.7.1",
"nativescript-dev-webpack": "next",
"typescript": "~3.4.5"
},
Expand Down
9 changes: 1 addition & 8 deletions e2e/router-tab-view/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@
"readme": "NativeScript Application",
"repository": "<fill-your-repository-here>",
"nativescript": {
"id": "org.nativescript.routertabview",
"tns-android": {
"version": "next"
},
"tns-ios": {
"version": "next"
}
"id": "org.nativescript.routertabview"
},
"dependencies": {
"@angular/animations": "~8.0.0",
Expand Down Expand Up @@ -41,7 +35,6 @@
"mocha": "~5.2.0",
"mochawesome": "~3.1.2",
"nativescript-dev-appium": "next",
"nativescript-dev-typescript": "next",
"typescript": "~3.4.5",
"@angular/compiler-cli": "8.0.0",
"@ngtools/webpack": "8.0.0"
Expand Down
6 changes: 1 addition & 5 deletions e2e/router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
"readme": "NativeScript Application",
"repository": "<fill-your-repository-here>",
"nativescript": {
"id": "org.nativescript.router",
"tns-android": {
"version": "next"
}
"id": "org.nativescript.router"
},
"dependencies": {
"@angular/animations": "~8.0.0",
Expand Down Expand Up @@ -41,7 +38,6 @@
"mocha": "~5.2.0",
"mochawesome": "~3.1.2",
"nativescript-dev-appium": "next",
"nativescript-dev-typescript": "next",
"nativescript-dev-webpack": "next",
"tslib": "^1.7.1",
"typescript": "~3.4.5"
Expand Down
9 changes: 1 addition & 8 deletions e2e/single-page/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@
"readme": "NativeScript Application",
"repository": "<fill-your-repository-here>",
"nativescript": {
"id": "org.nativescript.singlepage",
"tns-ios": {
"version": "next"
},
"tns-android": {
"version": "next"
}
"id": "org.nativescript.singlepage"
},
"dependencies": {
"@angular/animations": "~8.0.0",
Expand Down Expand Up @@ -44,7 +38,6 @@
"mocha": "~5.2.0",
"mochawesome": "~3.1.2",
"nativescript-dev-appium": "next",
"nativescript-dev-typescript": "next",
"nativescript-dev-webpack": "next",
"tslib": "^1.7.1",
"typescript": "~3.4.5"
Expand Down
14 changes: 5 additions & 9 deletions e2e/tests-app-ng/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@
"readme": "NativeScript Application",
"repository": "<fill-your-repository-here>",
"nativescript": {
"id": "org.nativescript.testsappng",
"tns-ios": {
"version": "next"
},
"tns-android": {
"version": "next"
}
"id": "org.nativescript.testsappng"
},
"dependencies": {
"@angular/common": "~8.0.0",
Expand All @@ -35,9 +29,11 @@
"codelyzer": "^4.0.0",
"filewalker": "^0.1.3",
"lazy": "1.0.11",
"nativescript-dev-typescript": "next",
"nativescript-dev-webpack": "next",
"tslint": "^5.4.3"
"tslint": "^5.4.3",
"typescript": "~3.4.5",
"@angular/compiler-cli": "~8.0.0",
"@ngtools/webpack": "~8.0.0"
},
"scripts": {
"tslint": "tslint --config tslint.json 'app/**/*.ts'",
Expand Down
8 changes: 1 addition & 7 deletions ng-sample/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
{
"nativescript": {
"id": "org.nativescript.ngsample",
"tns-android": {
"version": "next"
},
"tns-ios": {
"version": "next"
}
"id": "org.nativescript.ngsample"
},
"name": "tns-template-hello-world",
"main": "app.js",
Expand Down
1 change: 0 additions & 1 deletion tests/nsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"useLegacyWorkflow": false,
"appPath": "app",
"appResourcesPath": "app/App_Resources"
}
9 changes: 1 addition & 8 deletions tests/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
{
"nativescript": {
"id": "org.nativescript.ngtests",
"tns-ios": {
"version": "next"
},
"tns-android": {
"version": "next"
}
"id": "org.nativescript.ngtests"
},
"name": "ngtests",
"version": "1.0.0",
Expand Down Expand Up @@ -60,7 +54,6 @@
"karma-webpack": "3.0.5",
"lazy": "1.0.11",
"mocha": "6.1.4",
"nativescript-dev-typescript": "next",
"nativescript-dev-webpack": "next",
"remove-strict-webpack-plugin": "~0.1.2",
"sinon": "^7.3.2",
Expand Down
12 changes: 7 additions & 5 deletions tests/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,13 @@ module.exports = env => {

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

const {
// The 'appPath' and 'appResourcesPath' values are fetched from
// the nsconfig.json configuration file
// when bundling with `tns run android|ios --bundle`.
appPath = "app",
appResourcesPath = "app/App_Resources",
appResourcesPath = "App_Resources",

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

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

nsWebpack.processAppComponents(appComponents, platform);
const config = {
mode: production ? "production" : "development",
context: appFullPath,
Expand Down Expand Up @@ -212,6 +213,7 @@ module.exports = env => {
unitTesting,
appFullPath,
projectRoot,
ignoredFiles: nsWebpack.getUserDefinedEntries(entries, platform)
}
},
].filter(loader => !!loader)
Expand Down Expand Up @@ -261,7 +263,7 @@ module.exports = env => {
// Define useful constants like TNS_WEBPACK
new webpack.DefinePlugin({
"global.TNS_WEBPACK": "true",
"process": undefined,
"process": "global.process",
}),
// Remove all files from the out dir.
new CleanWebpackPlugin(itemsToClean, { verbose: !!verbose }),
Expand Down