Skip to content

Commit d69e568

Browse files
authored
fix: add missing configuration keys and move profiling out of android key (NativeScript#8847)
1 parent f73dfb4 commit d69e568

File tree

2 files changed

+29
-16
lines changed

2 files changed

+29
-16
lines changed

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
"start": "nps",
88
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s"
99
},
10-
"private": true,
11-
"repository": {
12-
"type": "git",
13-
"url": "https://github.com/NativeScript/NativeScript.git"
14-
},
10+
"private": true,
11+
"repository": {
12+
"type": "git",
13+
"url": "https://github.com/NativeScript/NativeScript.git"
14+
},
1515
"dependencies": {
1616
"nativescript-theme-core": "^1.0.4"
1717
},

packages/core/config/config.interface.ts

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
interface IConfigPlaform {
1+
import type {InstrumentationMode} from '../profiling'
2+
3+
interface IConfigPlatform {
24
/**
35
* App's bundle id
46
*/
@@ -10,9 +12,10 @@ interface IConfigPlaform {
1012
discardUncaughtJsExceptions?: boolean;
1113
}
1214

13-
interface IConfigIOS extends IConfigPlaform {}
15+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
16+
interface IConfigIOS extends IConfigPlatform {}
1417

15-
interface IConfigAndroid extends IConfigPlaform {
18+
interface IConfigAndroid extends IConfigPlatform {
1619
/**
1720
* These are the v8 runtime flags you can pass in, you must have "--expose_gc" as this is used in the runtime
1821
*/
@@ -46,11 +49,6 @@ interface IConfigAndroid extends IConfigPlaform {
4649
*/
4750
gcThrottleTime?: number;
4851

49-
/**
50-
* Enabled "timeline" profiling by setting this key to "timeline", default: ""
51-
*/
52-
profiling?: string;
53-
5452
/**
5553
* "none" & "full" is supported, "full" is depreciated
5654
* Default: none
@@ -91,8 +89,8 @@ interface IConfigAndroid extends IConfigPlaform {
9189
enableLineBreakpoints?: boolean;
9290

9391
/**
94-
* Enabled the multithreaded JavaScript engine, this will probably break plugins...
95-
* Disabled/Default: false
92+
* Enable the multithreaded JavaScript engine, this will probably break plugins...
93+
* Default: false - disabled.
9694
*/
9795
enableMultithreadedJavascript?: boolean;
9896
}
@@ -104,9 +102,13 @@ export interface NativeScriptConfig {
104102
*/
105103
id?: string;
106104
/**
107-
* App's main entry file
105+
* App's main entry file (currently ignored - set it in package.json main field)
108106
*/
109107
main?: string;
108+
/**
109+
* Path to the app source directory
110+
* This is often the `src` or `app` directory however can be changed.
111+
*/
110112
appPath?: string;
111113
/**
112114
* App_Resources path
@@ -131,4 +133,15 @@ export interface NativeScriptConfig {
131133
* Various Android specific configurations including Android runtime flags.
132134
*/
133135
android?: IConfigAndroid;
136+
/**
137+
* Enable profiling for the application. Default: no profiling
138+
* In most cases when profiling, you will want to use "timeline"
139+
*/
140+
profiling?: InstrumentationMode;
141+
/**
142+
* Set the default CSS parser that NativeScript will use.
143+
* Default: css-tree
144+
*/
145+
cssParser?: 'rework' | 'nativescript' | 'css-tree';
134146
}
147+

0 commit comments

Comments
 (0)