mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
chore: grammar and typos in .md files (#9632)
This commit is contained in:
@@ -54,7 +54,7 @@ We love you and your PR's 🤗. Please follow our [contributing guide](https://g
|
||||
|
||||
## Other source repos
|
||||
|
||||
Outside of the source centralized in this repo, NativeScript consists of a few other source repos. Here are the major ones:
|
||||
Outside the source centralized in this repo, NativeScript consists of a few other source repos. Here are the major ones:
|
||||
|
||||
- **[iOS runtime](https://github.com/NativeScript/ns-v8ios-runtime)**
|
||||
- [](https://www.npmjs.com/package/@nativescript/ios)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
***e2e tests execution***
|
||||
|
||||
1. Local setup
|
||||
- install appium and all requirments related to `nativescript-dev-appium` plugin usage
|
||||
- install appium and all requirements related to `nativescript-dev-appium` plugin usage
|
||||
- download images:
|
||||
|
||||
```npm run load-images Emulator-Api23-Default "iPhone X 12"```
|
||||
@@ -36,7 +36,7 @@
|
||||
- Run:
|
||||
|
||||
`npm run e2e-debug [android|ios]`
|
||||
run in separate console and don't kill it. This command will start appium server and driver and use the installed app on the device but it will not execute tests.
|
||||
run in separate console and don't kill it. This command will start appium server and driver and use the installed app on the device, but it will not execute tests.
|
||||
- Go to vs code debugging and use a config like:
|
||||
|
||||
```
|
||||
|
||||
@@ -23,7 +23,7 @@ Before starting, make yourself familiar with the `@nativescript/webpack`'s [docu
|
||||
## Project Structure
|
||||
|
||||
The repository contains several ingredients:
|
||||
* `installer.js` - combination of postinstall scripts for adding or removing webpack configurations and necessary dependecies when installing the plugin.
|
||||
* `installer.js` - combination of postinstall scripts for adding or removing webpack configurations and necessary dependencies when installing the plugin.
|
||||
* `templates/` - webpack config templates for different types of projects - NativeScript with JavaScript, NativeScript with TypeScript and NativeScript Angular projects.
|
||||
* `plugins/` - several [Webpack plugins](https://webpack.js.org/concepts/plugins/) necessary for bundling NativeScript applications.
|
||||
* `snapshot/android/` - tools used with the `NativeScriptSnapshot` plugin for generating V8 Heap Snapshots.
|
||||
@@ -164,7 +164,7 @@ git checkout release && git pull
|
||||
git merge --ff-only origin/master
|
||||
```
|
||||
*** Note: If there are commits in release branch which are not merged in master branch '-ff-merge' command will fail.
|
||||
In this case the commits should be merge firstly from release in master branch as explained in section 'Merge changes from release into master' and then repeat step 1.
|
||||
In this case the commits should be merged firstly from release in master branch as explained in section 'Merge changes from release into master' and then repeat step 1.
|
||||
|
||||
2. Execute `npm i` to install dependencies:
|
||||
```
|
||||
@@ -233,7 +233,7 @@ git commit
|
||||
git push
|
||||
```
|
||||
|
||||
6. Create pull request. Replace replace env ${MERGE_BRANCH} with its value
|
||||
6. Create pull request. Replace env ${MERGE_BRANCH} with its value
|
||||
```
|
||||
curl -d '{"title": "chore: merge release in master","body": "chore: merge release in master","head": "merge-release-in-master","base": "master"}' -X POST https://api.github.com/repos/NativeScript/NativeScript/pulls -H "Authorization: token ${GIT_TOKEN}"
|
||||
```
|
||||
@@ -244,4 +244,4 @@ git checkout origin/master tns-platform-declarations/package.json tns-core-modul
|
||||
git commit --amend
|
||||
git push --force-with-lease
|
||||
```
|
||||
This will require to repeat steps from 1 to 4, since we need to keep the branches with the same history
|
||||
This will require repeating steps from 1 to 4, since we need to keep the branches with the same history
|
||||
|
||||
@@ -94,12 +94,12 @@ When you click on the button, you will be redirected to the report page. On the
|
||||
|
||||
> Note: Each item name consists of the application name, type of device and platform version: `pr-e2e-tests-[application-name]-[device-type]-[platform-version]`. Usually, the test applications, that are executed for PRs are part of NativeScript repository.
|
||||
|
||||
Based on the executed suite, one of the following or all of the following files will be generated: `mochawesome.html` | `index.html` | `unit-tests.log`. Some of the reports also might include `*.png`, `*.logs` or `[page source].xml` files that can help in understanding where is the problem.
|
||||
Based on the executed suite, one of the following or all of the following files will be generated: `mochawesome.html` | `index.html` | `unit-tests.log`. Some reports also might include `*.png`, `*.logs` or `[page source].xml` files that can help in understanding where is the problem.
|
||||
|
||||
For example:
|
||||
1. When you select the `index.html` page, an additional `TestNG Results` sidebar will be displayed. There you can find a list of all failures.
|
||||
2. When you select one of them, you will see on the right side all tests, that have been executed. The problematic ones will be coloured in red.
|
||||
3. If you click on one of them, detailed info or error log will be displayed. As we've mentioned above in some of the test reports, you will also find screenshots, that demonstrates the problem visually. Those images can be found below the info/ error log.
|
||||
3. If you click on one of them, detailed info or error log will be displayed. As we've mentioned above in some test reports, you will also find screenshots, that demonstrates the problem visually. Those images can be found below the info/ error log.
|
||||
|
||||
## <a name="commit-messages"></a> Commit Message Guidelines
|
||||
|
||||
@@ -248,7 +248,7 @@ git checkout release
|
||||
git merge --ff-only origin/master
|
||||
```
|
||||
*** Note: If there are commits in release branch which are not merged in master branch '-ff-merge' command will fail.
|
||||
In this case the commits should be merge firstly from release in master branch as explained in section 'Merge changes from release into master' and then repeat step 1.
|
||||
In this case the commits should be merged firstly from release in master branch as explained in section 'Merge changes from release into master' and then repeat step 1.
|
||||
|
||||
2. Execute `npm i` to install dependencies:
|
||||
```
|
||||
@@ -277,7 +277,7 @@ npm --no-git-tag-version version [major|minor|patch] -m "release: cut the %s rel
|
||||
cd ..
|
||||
```
|
||||
6. Set correct version of **tns-core-modules-widgets** in tns-core-modules/package.json.
|
||||
Usually tns-core-modules-widgets should already have been released and we need to set the official version.
|
||||
Usually tns-core-modules-widgets should already have been released, and we need to set the official version.
|
||||
|
||||
7. Create release-branch with change log
|
||||
```
|
||||
@@ -333,7 +333,7 @@ git commit
|
||||
git push
|
||||
```
|
||||
|
||||
6. Create pull request. Replace replace env ${MERGE_BRANCH} with its value
|
||||
6. Create pull request. Replace env ${MERGE_BRANCH} with its value
|
||||
```
|
||||
curl -d '{"title": "chore: merge release in master","body": "chore: merge release in master","head": "merge-release-in-master","base": "master"}' -X POST https://api.github.com/repos/NativeScript/NativeScript/pulls -H "Authorization: token ${GIT_TOKEN}"
|
||||
```
|
||||
@@ -344,4 +344,4 @@ git checkout origin/master tns-platform-declarations/package.json tns-core-modul
|
||||
git commit --amend
|
||||
git push --force-with-lease
|
||||
```
|
||||
This will require to repeat steps from 1 to 4, since we need to keep the branches with the same history
|
||||
This will require repeating steps from 1 to 4, since we need to keep the branches with the same history
|
||||
|
||||
@@ -509,7 +509,7 @@ class Foo {
|
||||
```
|
||||
|
||||
## TypeScript optional parameters
|
||||
**Do not** use optional parameters in IMPLEMENTATION files. This is because the TS compiler generates additional array and populates its from the **arguments** object. Still, it is OK to use these in a definition file (as declarations ONLY).
|
||||
**Do not** use optional parameters in IMPLEMENTATION files. This is because the TS compiler generates additional array and populates it from the **arguments** object. Still, it is OK to use these in a definition file (as declarations ONLY).
|
||||
|
||||
*Right:*
|
||||
```TypeScript
|
||||
|
||||
@@ -50,7 +50,7 @@ You can do changes in the test app and `nativescript-core` and rely on HMR to re
|
||||
|
||||
## Running the `e2e` Test Apps
|
||||
|
||||
There are couple of application used for development and testing.
|
||||
There are a couple of application used for development and testing.
|
||||
The `ui-test-app` is the more frequently used for development and validation. It is an ordinary NativeScript app that logs the test results on the go.
|
||||
|
||||
After the [initial setup](#initial-setup) run the e2e apps with:
|
||||
|
||||
@@ -10,7 +10,7 @@ The `tns-core-modules/trace` utility module provides a good way to streamline er
|
||||
Here are the guidelines how to use this when contributing to core-modules or creating your own plugins.
|
||||
|
||||
### Use `trace.write()`
|
||||
Use trace.write() with the appropriate type to log non critical errors.
|
||||
Use trace.write() with the appropriate type to log non-critical errors.
|
||||
|
||||
>Note: For the `error` message level all loggers will be notified unconditionally, for all other levels (`log`,`info`,`warn`), tracing should be enabled and the corresponding categories should be added.
|
||||
|
||||
@@ -21,7 +21,7 @@ Use the `error()` when an error has occurred which compromises the stability of
|
||||
|
||||
After calling `trace.error()` consider just returning from the function you are currently in without completing.
|
||||
|
||||
There are cases when code execution jumps between native code (ex. Android/iOS SDKs) and JavaScript trough callbacks. In those cases it is most difficult to determine if an error (ex. expected argument is `undefined` or current state of components is invalid) is critical or not. Although, it seems that error is unrecoverable, it might be the case that the callback is called when the app has gone to the background or trough activity/window that is not longer visible. So just reporting the error with `write()` or `error()` is a good option in such cases.
|
||||
There are cases when code execution jumps between native code (ex. Android/iOS SDKs) and JavaScript trough callbacks. In those cases it is most difficult to determine if an error (ex. expected argument is `undefined` or current state of components is invalid) is critical or not. Although, it seems that error is unrecoverable, it might be the case that the callback is called when the app has gone to the background or trough activity/window that is no longer visible. So just reporting the error with `write()` or `error()` is a good option in such cases.
|
||||
|
||||
|
||||
## Throw the Error directly in code
|
||||
@@ -31,6 +31,6 @@ Avoid throwing errors directly, especially in code that is not directly called f
|
||||
2. Obviously misused public APIs (ex. wrong arguments types) which developers will call directly.
|
||||
|
||||
## Clearing Legacy Code
|
||||
Not all the code in the `tns-core-modules` might conform to this guide as it might be written before some of the improvements of the trace modules (ex. `error()`). If you came across to such code you can always [give us a PR](CONTRIBUTING.md) referencing [this issue](https://github.com/NativeScript/NativeScript/issues/5914).
|
||||
Not all the code in the `tns-core-modules` might conform to this guide as it might be written before some improvements of the trace modules (ex. `error()`). If you came across to such code you can always [give us a PR](CONTRIBUTING.md) referencing [this issue](https://github.com/NativeScript/NativeScript/issues/5914).
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user