You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/configuration/nativescript.md
+18-8
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ contributors:
9
9
The `nativescript.config.ts` is a central place to configure your project. It allows you to configure your project structure, application id, runtime related flags and more.
10
10
11
11
::: info Note about the `.ts` extension
12
-
You can author the config file as plain `.js` file as well, however we recommend sticking with the `.ts` extension even if your project doesn't use TypeScript, because most editors will provide autocompletion in the `.ts` file.
12
+
You can author the config file as plain `.js` file as well. We recommend sticking with the `.ts` extension even if your project doesn't use TypeScript, because most editors will provide autocompletion in the `.ts` file.
13
13
:::
14
14
15
15
By default a config looks somewhat like the following
Specifies the [webpack config](/webpack) location. The default is `webpack.config.js` in the root however you can use a custom name and place elsewhere.
101
+
Specifies the [webpack config](/webpack) location. The default is `webpack.config.js` in the root.
Discard any uncaught JS exceptions. This can be very useful in production environments where you don't want your app to crash in case an unexpected JS exception is thrown.
215
+
Discard any uncaught JS exceptions. This can be useful in production environments where you don't want your app to crash in case an unexpected JS exception is thrown.
212
216
213
217
### android.v8Flags
214
218
@@ -256,7 +260,13 @@ Trigger a gc periodically (in `ms`). Defaults to `0` (disabled).
256
260
android.markingMode: 'none'|'full';
257
261
```
258
262
259
-
Sets the default gc marking mode, defaults to `none`. `full` has been deprecated and it's not recommended.
263
+
Sets the default gc marking mode, defaults to `none`.
264
+
265
+
::: warning Deprecated value
266
+
267
+
`full` has been deprecated and it's not recommended.
268
+
269
+
:::
260
270
261
271
### android.handleTimeZoneChanges
262
272
@@ -272,7 +282,7 @@ Notify the app when the timezone changes, defaults to `false`.
272
282
android.maxLogcatObjectSize: number=9999;
273
283
```
274
284
275
-
Sets the maximum lenght of a single output string. Defaults to `1024`.
285
+
Sets the max length of a single output string. Defaults to `1024`.
276
286
277
287
### android.forceLog
278
288
@@ -336,7 +346,7 @@ See also [android.id](#android-id).
336
346
ios.discardUncaughtJsExceptions: boolean=true;
337
347
```
338
348
339
-
Discard any uncaught JS exceptions. This can be very useful in production environments where you don't want your app to crash in case an unexpected JS exception is thrown.
349
+
Discard any uncaught JS exceptions. This can be useful in production environments where you don't want your app to crash in case an unexpected JS exception is thrown.
340
350
341
351
### ios.SPMPackages
342
352
@@ -396,7 +406,7 @@ Avaialable hooks (prefix with `before-` or `after-`):
396
406
-`install` - Application installed to device/emulator
397
407
-`prepare` - Compiles webpack and prepares native app in platforms folder
398
408
-`prepareNativeApp` - Preparing the actual native app, runs during prepare/watch hook
399
-
-`resolveCommand` - Resolves command and arguments, runs before all cli commands
409
+
-`resolveCommand` - Resolves command and arguments, runs before all CLI commands
400
410
-`watch` - Setup watchers for live sync, runs during prepare hook
401
411
-`watchPatterns` - Setup watch patterns, runs during watch hook
Copy file name to clipboardExpand all lines: content/configuration/webpack.md
+4-2
Original file line number
Diff line number
Diff line change
@@ -127,7 +127,7 @@ We define a few useful globally available variables that you can use to alter lo
127
127
-`__NS_WEBPACK__` - always `true` when building with webpack
128
128
-`__NS_ENV_VERBOSE__` - `true` when `--env.verbose` is set
129
129
-`__NS_DEV_HOST_IPS__` - an array of IP addresses of the host machine (the machine running the build) when in `development` mode, and an empty array in production mode.
130
-
-`__CSS_PARSER__` - the css parser used by NativeScript Core. The value is set based on the `cssParser` value in the `nativescript.config.ts` and defaults to `css-tree`
130
+
-`__CSS_PARSER__` - the CSS parser used by NativeScript Core. The value is set based on the `cssParser` value in the `nativescript.config.ts` and defaults to `css-tree`
131
131
-`__UI_USE_XML_PARSER__` - a flag used by NativeScript Core to disable the XML parser when it's not used
132
132
-`__UI_USE_EXTERNAL_RENDERER__` - a flag used by NativeScript Core to disable registering global modules when an external renderer is used.
133
133
@@ -486,7 +486,7 @@ module.exports = (env) => {
486
486
487
487
In some cases, you may want to explicitly set which base config should be used.
488
488
489
-
For example in the NativeScript-Vue repo, the `sample` app doesn't have `nativescript-vue` listed as a dependency, so we have to specify the base config we want to use.
489
+
For example in the NativeScript-Vue repository, the `sample` app doesn't have `nativescript-vue` listed as a dependency, so we have to specify the base config we want to use.
490
490
491
491
```js
492
492
constwebpack=require('@nativescript/webpack')
@@ -528,6 +528,8 @@ module.exports = (env) => {
528
528
529
529
### Merging options into the config
530
530
531
+
<!--alex ignore simple-->
532
+
531
533
For simple things, you can merge objects into the final config instead of using `chainWebpack`
Copy file name to clipboardExpand all lines: content/guide/code-sharing.md
+5-5
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ JavaScript provides opportunities of immense scalability if architectured proper
10
10
**The NativeScript TSC's 5 fundamental lessons about good code sharing**:
11
11
12
12
1. If you can share your code easily with other paradigms, other disciplines, other runtimes even, then you have a good code sharing approach that will continue to provide you and your team joy. No developer or team willingly gets into code sharing hoping to find themselves in a corner later. You always want to share now to more easily maintain and scale the code later.
13
-
2. A good code sharing approach should fit naturally in with well supported community standards and not require any extra build tooling just for the sharability to support itself. It should, in other words, stand firmly on it's own in scope of the language it is written in.
13
+
2. A good code sharing approach should fit naturally in with well supported community standards and not require any extra build tooling for the sharability to support itself. It should, in other words, stand firmly on it's own in scope of the language it is written in.
14
14
3. A good code sharing approach should not have to introduce new file extensions purely for sake of sharability (outside of those naturally supported by the framework) to deal with. All team's organize code by folders naturally and the same should be matched with good code sharing approaches avoiding new file extensions and concepts that go beyond general code organization.
15
15
4. A good code sharing approach should clearly identify deployment/distribution lines as well as distinct platform separation allowing various shared code segments to have clear designated deployment targets allowing teams to control their own sophisticated build pipelines as they desire. Further the shared code should live within a thoughtful organizational structure that supports the ability to scale and adapt to future needs aside from the deployment targets that use the shared code.
16
16
5. Within the specific scope of NativeScript's viewpoint, JavaScript is the universal language which provides the opportunity to share code effectively and responsibly. An approach that is based fundamentally on the strengths of JavaScript (and inherently TypeScript) is a good code sharing approach.
@@ -32,7 +32,7 @@ Here are a few solitions to **code-sharing**, each having their pros and cons.
32
32
**Pros:**
33
33
34
34
- It's centered around JavaScript/TypeScript (lesson 1 and 5 above)
35
-
- Uses standard build tooling like typescript or webpack to build code (lesson 2 above)
35
+
- Uses standard build tooling like TypeScript or webpack to build code (lesson 2 above)
36
36
- No custom file extensions to deal with (lesson 3 above)
37
37
- Nx splits up "apps" and "libs" clearly identifying deployment/distribution targets "apps" that consume shared code "libs" (lesson 4 above)
38
38
@@ -47,7 +47,7 @@ Here are a few solitions to **code-sharing**, each having their pros and cons.
47
47
**Pros:**
48
48
49
49
- It's centered around JavaScript/TypeScript (lesson 1 and 5 above)
50
-
- Uses standard build tooling like typescript or webpack to build code (lesson 2 above)
50
+
- Uses standard build tooling like TypeScript or webpack to build code (lesson 2 above)
51
51
- No custom file extensions to deal with (lesson 3 above)
52
52
- Nx splits up "apps" and "libs" clearly identifying deployment/distribution targets "apps" that consume shared code "libs" (lesson 4 above)
53
53
- It builds upon @nativescript/nx to further scale it across more paradigms so it's a natural extension when needed if already working in Nx with @nativescript/nx
@@ -66,7 +66,7 @@ Here are a few solitions to **code-sharing**, each having their pros and cons.
66
66
**Pros:**
67
67
68
68
- It's centered around JavaScript/TypeScript (lesson 1 and 5 above)
69
-
- Uses standard build tooling like typescript or webpack to build code (lesson 2 above)
69
+
- Uses standard build tooling like TypeScript or webpack to build code (lesson 2 above)
70
70
- No custom file extensions to deal with (lesson 3 above)
71
71
- Can link/share dependencies
72
72
@@ -82,7 +82,7 @@ Here are a few solitions to **code-sharing**, each having their pros and cons.
82
82
**Pros:**
83
83
84
84
- It's centered around JavaScript/TypeScript (lesson 1 and 5 above)
85
-
- Uses standard build tooling like typescript or webpack to build code (lesson 2 above)
85
+
- Uses standard build tooling like TypeScript or webpack to build code (lesson 2 above)
86
86
- No custom file extensions to deal with (lesson 3 above)
| Timeline and CPU Profiling |:white_check_mark:|:white_check_mark:|
87
87
88
-
## Debugging with VSCode
88
+
## Debugging with VS Code
89
89
90
-
VSCode uses the same protocol as the Chrome DevTools, in order to start a debugging session in VSCode you need to install the [NativeScript extension for VS Code](https://marketplace.visualstudio.com/items?itemName=NativeScript.nativescript).
90
+
VS Code uses the same protocol as the Chrome DevTools, in order to start a debugging session in VS Code you need to install the [NativeScript extension for VS Code](https://marketplace.visualstudio.com/items?itemName=NativeScript.nativescript).
91
91
92
92
::: warning Note
93
-
The VSCode extension for NativeScript is currently outdated and may not work. We are planning on revamping the project and bring it up-to-date with all the latest features soon.
93
+
The VS Code extension for NativeScript is currently outdated and may not work. We are planning on revamping the project and bring it up-to-date with all the latest features soon.
Copy file name to clipboardExpand all lines: content/guide/multithreading.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ The Workers API in NativeScript is loosely based on the [Web Workers API](https:
15
15
For optimal results when using the Workers API, follow these guidelines:
16
16
17
17
- Always make sure you close the worker threads, using the appropriate API (`terminate()` or `close()`), when the worker's finished its job. If Worker instances become unreachable in the scope you are working in before you are able to terminate it, you will be able to close it only from inside the worker script itself by calling the `close()` function.
18
-
- Workers are not a general solution for all performance-related problems. Starting a Worker has an overhead of its own, and may sometimes be slower than just processing a quick task. Optimize DB queries, or rethink complex application logic before resorting to workers.
18
+
- Workers are not a general solution for all performance-related problems. Starting a Worker has an overhead of its own, and may sometimes be slower than processing a quick task. Optimize DB queries, or rethink complex application logic before resorting to workers.
19
19
- Since worker threads have access to the entire native SDK, the NativeScript developer must take care of all the synchronization when calling APIs which are not guaranteed to be thread-safe from more than one thread.
Copy file name to clipboardExpand all lines: content/guide/shared-element-transitions.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -81,7 +81,7 @@ page.showModal('views/modal', {
81
81
82
82
### Independent shared elements
83
83
84
-
In some cases you might not have an element present on both "ends", or just need to animate additional elements during the transition. That's what "independent" shared elements solve.
84
+
In some cases you might not have an element present on both "ends", or need to animate additional elements during the transition. That's what "independent" shared elements solve.
85
85
86
86
Consider the following example:
87
87
@@ -420,7 +420,7 @@ Used internally to finish the state after a transition has completed. Provided i
420
420
421
421
## Troubleshooting
422
422
423
-
- It's easy to accidentally provide mismatching `sharedTransitionTag` values between two different pages. Always check for matching tags when encountering issues with Shared Element Transitions.
423
+
- It's common to accidentally provide mismatching `sharedTransitionTag` values between two different pages. Always check for matching tags when encountering issues with Shared Element Transitions.
424
424
- Try avoiding `sharedTransitionTag` on Labels since they usually won't exhibit expected behavior.
Copy file name to clipboardExpand all lines: content/project-structure/app-resources.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -203,7 +203,7 @@ To change the mode of the TimePicker from the default `spinner` style, change `a
203
203
204
204
### Enabling force Dark Mode
205
205
206
-
On API29+ apps can opt-in to a default Dark Mode when the system is set to use Dark Mode. This is disabled by default as it can lead to visual issues, since the automatic conversion may not display correctly in all cases.
206
+
On API29+ apps can opt-in to a default Dark Mode when the system is set to use Dark Mode. This is turned off by default as it can lead to visual issues, since the automatic conversion may not display correctly in all cases.
207
207
208
208
To opt-in, change the `android:forceDarkAllowed` value to `true` in `App_Resources/Android/src/main/res/values-v29/styles.xml`:
Copy file name to clipboardExpand all lines: content/setup/linux.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ contributors:
10
10
11
11
You will need Node, NativeScript CLI (command line interface), Android Studio and a JDK (java development kit).
12
12
13
-
**Android Studio** is not strictly necessary — however it provides an easy to use interface for installing and managing the Android SDKs.
13
+
**Android Studio** is not strictly necessary — however it provides an easy-to-use interface for installing and managing the Android SDKs.
14
14
15
15
To install **Node** follow the [instructions specific to your Linux distribution](https://nodejs.org/en/download/package-manager/). We recommend using the latest version, however anything above **Node 12** should be fine.
0 commit comments