fix: add missing configuration keys and move profiling out of android key (#8847)

This commit is contained in:
Igor Randjelovic
2020-09-12 18:33:47 +02:00
committed by GitHub
parent f73dfb4e55
commit d69e568a4b
2 changed files with 29 additions and 16 deletions

View File

@ -7,11 +7,11 @@
"start": "nps", "start": "nps",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s" "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s"
}, },
"private": true, "private": true,
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/NativeScript/NativeScript.git" "url": "https://github.com/NativeScript/NativeScript.git"
}, },
"dependencies": { "dependencies": {
"nativescript-theme-core": "^1.0.4" "nativescript-theme-core": "^1.0.4"
}, },

View File

@ -1,4 +1,6 @@
interface IConfigPlaform { import type {InstrumentationMode} from '../profiling'
interface IConfigPlatform {
/** /**
* App's bundle id * App's bundle id
*/ */
@ -10,9 +12,10 @@ interface IConfigPlaform {
discardUncaughtJsExceptions?: boolean; discardUncaughtJsExceptions?: boolean;
} }
interface IConfigIOS extends IConfigPlaform {} // eslint-disable-next-line @typescript-eslint/no-empty-interface
interface IConfigIOS extends IConfigPlatform {}
interface IConfigAndroid extends IConfigPlaform { interface IConfigAndroid extends IConfigPlatform {
/** /**
* These are the v8 runtime flags you can pass in, you must have "--expose_gc" as this is used in the runtime * These are the v8 runtime flags you can pass in, you must have "--expose_gc" as this is used in the runtime
*/ */
@ -46,11 +49,6 @@ interface IConfigAndroid extends IConfigPlaform {
*/ */
gcThrottleTime?: number; gcThrottleTime?: number;
/**
* Enabled "timeline" profiling by setting this key to "timeline", default: ""
*/
profiling?: string;
/** /**
* "none" & "full" is supported, "full" is depreciated * "none" & "full" is supported, "full" is depreciated
* Default: none * Default: none
@ -91,8 +89,8 @@ interface IConfigAndroid extends IConfigPlaform {
enableLineBreakpoints?: boolean; enableLineBreakpoints?: boolean;
/** /**
* Enabled the multithreaded JavaScript engine, this will probably break plugins... * Enable the multithreaded JavaScript engine, this will probably break plugins...
* Disabled/Default: false * Default: false - disabled.
*/ */
enableMultithreadedJavascript?: boolean; enableMultithreadedJavascript?: boolean;
} }
@ -104,9 +102,13 @@ export interface NativeScriptConfig {
*/ */
id?: string; id?: string;
/** /**
* App's main entry file * App's main entry file (currently ignored - set it in package.json main field)
*/ */
main?: string; main?: string;
/**
* Path to the app source directory
* This is often the `src` or `app` directory however can be changed.
*/
appPath?: string; appPath?: string;
/** /**
* App_Resources path * App_Resources path
@ -131,4 +133,15 @@ export interface NativeScriptConfig {
* Various Android specific configurations including Android runtime flags. * Various Android specific configurations including Android runtime flags.
*/ */
android?: IConfigAndroid; android?: IConfigAndroid;
/**
* Enable profiling for the application. Default: no profiling
* In most cases when profiling, you will want to use "timeline"
*/
profiling?: InstrumentationMode;
/**
* Set the default CSS parser that NativeScript will use.
* Default: css-tree
*/
cssParser?: 'rework' | 'nativescript' | 'css-tree';
} }