Skip to content

Commit

Permalink
feat(nativescript): 6.2 support (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanWalker authored Nov 21, 2019
1 parent 6bc5776 commit 2c81cc2
Show file tree
Hide file tree
Showing 41 changed files with 90 additions and 223 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"git.enabled": false,
"workbench.colorCustomizations": {
"activityBar.background": "#ef7853",
"activityBar.activeBorder": "#8af4a3",
"activityBar.foreground": "#15202b",
"activityBar.inactiveForeground": "#15202b99",
"activityBarBadge.background": "#8af4a3",
Expand Down
8 changes: 4 additions & 4 deletions packages/angular/src/utils/versions.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
export const xplatVersion = '*';
export const nxVersion = '^8.5.0';
export const nxVersion = '^8.8.0';
export const angularVersion = '^8.2.0';
export const angularDevkitVersion = '^0.803.3';
export const ngxTranslateVersion = '~11.0.0';
export const ngxTranslateHttpLoaderVersion = '~4.0.0';
export const reflectMetadataVersion = '^0.1.12';
export const coreJsVersion = '^3.1.4';
export const rxjsVersion = '~6.4.0';
export const zonejsVersion = '~0.9.0';
export const coreJsVersion = '^3.3.2';
export const rxjsVersion = '~6.5.3';
export const zonejsVersion = '~0.10.2';
export const codelyzerVersion = '~5.1.0';
2 changes: 1 addition & 1 deletion packages/electron-angular/src/utils/versions.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export const xplatVersion = '*';
export const nxVersion = '~8.4.0';
export const nxVersion = '~8.8.0';
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"appResourcesPath": "App_Resources",
"appPath": "src",
"useLegacyWorkflow": false
"appPath": "src"
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@angular/language-service": "file:<%= pathOffset %>node_modules/@angular/language-service",
"@ngtools/webpack": "~8.3.0",
"codelyzer": "file:<%= pathOffset %>node_modules/codelyzer",
"nativescript-dev-webpack": "~1.2.0",
"nativescript-dev-webpack": "~1.3.0",
"terser-webpack-plugin": "file:<%= pathOffset %>node_modules/terser-webpack-plugin",
"tns-platform-declarations": "file:<%= pathOffset %>node_modules/tns-platform-declarations",
"typescript": "file:<%= pathOffset %>node_modules/typescript"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"android": {
"v8Flags": "--expose_gc",
"v8Flags": "--nolazy --expose_gc",
"markingMode": "none",
"codeCache": "true",
"suppressCallJSMethodExceptions": false
},
"discardUncaughtJsExceptions": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ module.exports = env => {

// You can provide the following flags when running 'tns run android|ios'
aot, // --env.aot
snapshot, // --env.snapshot
snapshot, // --env.snapshot,
production, // --env.production
uglify, // --env.uglify
report, // --env.report
Expand All @@ -66,9 +66,13 @@ module.exports = env => {
hmr, // --env.hmr,
unitTesting, // --env.unitTesting
verbose, // --env.verbose
ci // --env.ci
ci, // --env.ci
snapshotInDocker, // --env.snapshotInDocker
skipSnapshotTools, // --env.skipSnapshotTools
compileSnapshot // --env.compileSnapshot
} = env;

const useLibs = compileSnapshot;
const isAnySourceMapEnabled = !!sourceMap || !!hiddenSourceMap;
const externals = nsWebpack.getConvertedExternals(env.externals);
const appFullPath = resolve(projectRoot, appPath);
Expand Down Expand Up @@ -408,7 +412,10 @@ module.exports = env => {
'nativescript-angular/router'
],
projectRoot,
webpackConfig: config
webpackConfig: config,
snapshotInDocker,
skipSnapshotTools,
useLibs
})
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {
} from '@nstudio/xplat';
import { Schema } from './schema';
import { XplatNativeScriptAngularHelpers } from '../../utils';
import { tnsCoreVersion } from '../../utils/versions';
import { nsCoreVersion } from '../../utils/versions';
import { XplatNativeScriptHelpers } from '@nstudio/nativescript/src/utils';

export default function(options: Schema) {
Expand Down Expand Up @@ -205,7 +205,7 @@ function addNsCli(add: boolean): Rule {

packageJson.devDependencies = {
...(packageJson.devDependencies || {}),
nativescript: tnsCoreVersion
nativescript: nsCoreVersion
};

return updateJsonFile(tree, packagePath, packageJson);
Expand Down
4 changes: 2 additions & 2 deletions packages/nativescript-angular/src/utils/versions.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const xplatVersion = '*';
export const tnsCoreVersion = '~6.0.0';
export const nsNgVersion = '~8.0.0';
export const nsCoreVersion = '~6.2.0';
export const nsNgVersion = '~8.20.0';
export const nsNgFonticonVersion = '^4.2.0';
export const nodeSassVersion = '^4.12.0';
5 changes: 3 additions & 2 deletions packages/nativescript-angular/src/utils/xplat.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import { Tree, SchematicContext } from '@angular-devkit/schematics';
import { updateFile, XplatHelpers, IXplatSettings } from '@nstudio/xplat';
import { nsNgVersion, nsNgFonticonVersion, nodeSassVersion } from './versions';
import { nsNgVersion, nsNgFonticonVersion, nodeSassVersion, nsCoreVersion } from './versions';

export namespace XplatNativeScriptAngularHelpers {
export function updateRootDeps(options: XplatHelpers.Schema) {
return (tree: Tree, context: SchematicContext) => {
return XplatHelpers.updatePackageForXplat(options, {
dependencies: {
'nativescript-angular': nsNgVersion,
'nativescript-ngx-fonticon': nsNgFonticonVersion
'nativescript-ngx-fonticon': nsNgFonticonVersion,
'tns-core-modules': nsCoreVersion
},
devDependencies: {
'node-sass': nodeSassVersion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

android {
defaultConfig {
minSdkVersion 17
targetSdkVersion 29
generatedDensities = []
applicationId = "__PACKAGE__"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<activity
android:name="com.tns.NativeScriptActivity"
android:label="@string/title_activity_kimera"
android:configChanges="keyboardHidden|orientation|screenSize"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|smallestScreenSize|screenLayout|locale|uiMode"
android:theme="@style/LaunchScreenTheme">

<meta-data android:name="SET_THEME_ON_LAUNCH" android:resource="@style/AppTheme" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "icon-20@2x.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "icon-20@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
Expand Down Expand Up @@ -42,6 +54,18 @@
"filename" : "icon-60@3x.png",
"scale" : "3x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "icon-20.png",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "icon-20@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
Expand Down Expand Up @@ -89,7 +113,7 @@
"idiom" : "ios-marketing",
"filename" : "icon-1024.png",
"scale" : "1x"
}
}
],
"info" : {
"version" : 1,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
},
{
"idiom" : "universal",
"filename" : "LaunchScreen-AspectFill@3x.png",
"scale" : "3x"
}
],
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
},
{
"idiom" : "universal",
"filename" : "LaunchScreen-Center@3x.png",
"scale" : "3x"
}
],
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 2c81cc2

Please sign in to comment.