Skip to content

Commit c5958f9

Browse files
committed
Review
1 parent 44c44d3 commit c5958f9

2 files changed

Lines changed: 20 additions & 20 deletions

File tree

content/en/docs/apidocs-mxsdk/mxsdk/sdk-howtos/creating-your-first-script.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ After setting up all the prerequisites, you can start writing a first script tha
4545
main().catch(console.error);
4646
```
4747

48-
Don't forget to [set up your personal access token](/apidocs-mxsdk/mxsdk/set-up-your-pat/) before executing the script.
48+
Do not forget to [set up your personal access token](/apidocs-mxsdk/mxsdk/set-up-your-pat/) before executing the script.
4949

5050
{{% alert color="warning" %}}
5151
Working copy creation is a resource-intensive process. Consider reusing previously-created ones by invoking `app.getOnlineWorkingCopy(workingCopyId)`. All working copies are automatically deleted after 24 hours.
5252
{{% /alert %}}
5353

5454
### Code Explanation
5555

56-
Here are some explanations about the script:
56+
Here are some explanations about the script.
5757

5858
```ts
5959
const client = new MendixPlatformClient();
@@ -92,15 +92,15 @@ Once you are done with the model changes, you can flush the changes to make sure
9292

9393
## Compiling and Running the Script
9494

95-
1. Add the following section to `package.json`
95+
1. Add the following section to `package.json`:
9696

9797
```json
9898
"scripts": {
9999
"start": "tsc && node script.js"
100100
}
101101
```
102102

103-
This command will first compile your TypeScript code into JavaScript using the TypeScript compiler. After compilation, a file named `script.js` will be generated. The script will then be executed using Node.js.
103+
This command first compiles your TypeScript code into JavaScript using the TypeScript compiler. After the compilation, a file named `script.js` is generated. The script will then be executed using Node.js.
104104

105105
2. Run the script to see the results:
106106

@@ -114,7 +114,7 @@ Once you are done with the model changes, you can flush the changes to make sure
114114
Successfully committed the working copy with id 'c70b078e-a323-42a7-b95d-7407a0e611d3' to branch 'main'
115115
```
116116

117-
Note that the steps for app creation and committing to the Team Server can take some time, so please be patient.
117+
The steps for app creation and committing to the Team Server can take some time. Please be patient.
118118

119119
## Next Step
120120

content/en/docs/apidocs-mxsdk/mxsdk/sdk-howtos/setting-up-your-development-environment.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,14 @@ $ npm init --yes
2222
$ npm install mendixmodelsdk mendixplatformsdk --save
2323
$ npm install typescript@~4.6.2 @types/node@^22 --save-dev
2424
```
25-
You can now proceed directly to step 6 in the detailed instructions to configure TypeScript.
25+
26+
You can now proceed directly to step 6 in the [Setting Up a Working Directory for Your Script](#setting-working-directory) section to configure TypeScript.
2627

2728
## Setting Up Your Development Tools {#setting}
2829

2930
To set up your development tools, follow these steps:
3031

31-
1. Install the latest LTS version of [Node.js](https://nodejs.org/). If you need to download it, you can find it on [this page](https://nodejs.org/en/download/releases/).
32+
1. Download and install the latest LTS version of [Node.js](https://nodejs.org/en/download).
3233

3334
2. Open a terminal (on Windows, [Command Prompt](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/windows-commands)) and run the following command:
3435

@@ -37,14 +38,13 @@ To set up your development tools, follow these steps:
3738
v22.15.0
3839
```
3940

40-
For Debian-based Linux distributions such as Ubuntu, please refer to [NodeSource Node.js Binary Distributions](https://github.com/nodesource/distributions#user-content-installation-instructions) to properly set up your apt-get sources.
41-
42-
In the rest of the how-tos, in blocks such as the above, lines starting with a `$` represent commands to type into a terminal. Sometimes a line follows without a $, represents output of the command.
41+
For Debian-based Linux distributions such as Ubuntu, refer to [NodeSource Node.js Binary Distributions](https://github.com/nodesource/distributions#user-content-installation-instructions) to properly set up your apt-get sources.
4342

44-
3. Install [Visual Studio Code](https://code.visualstudio.com/) (not to be confused with Visual Studio), a text editor/IDE with good support for [TypeScript](https://www.typescriptlang.org/). Make sure you have a recent version (v1.11.0+); check the version you are using through Help > About when you have Code opened.
43+
In the rest of the how-tos, in code blocks such as the above, lines starting with a `$` represent the commands you should type into a terminal. Lines without `$` immediately following a command represent the output produced by that command.
4544

45+
3. Install [Visual Studio Code](https://code.visualstudio.com/) (VS Code: not to be confused with Visual Studio), a text editor/IDE with good support for [TypeScript](https://www.typescriptlang.org/). Make sure you have a recent version (v1.11.0+). Check the version you are using through **Help > About** when you have VS Code opened.
4646

47-
## Setting Up a Working Directory for Your Script
47+
## Setting Up a Working Directory for Your Script {#setting-working-directory}
4848

4949
To set up a working directory for your script, follow these steps:
5050

@@ -58,13 +58,13 @@ To set up a working directory for your script, follow these steps:
5858

5959
Visual Studio Code, other than Visual Studio, works with directories instead of project files.
6060

61-
2. Start **Visual Studio Code** and open the directory you just created. You can open a new instance of Code from the command line with the directory you want to open as first argument. For example, if your current working directory in your terminal is the directory in which all your project files live, use the following command to open Code:
61+
2. Start Visual Studio Code and open the directory you just created. You can open a new instance of VS Code from the command line with the directory you want to open as first argument. For example, if your current working directory in your terminal is the directory in which all your project files live, use the following command to open VS Code:
6262

6363
```bash
6464
$ code .
6565
```
6666

67-
3. Add `mendixmodelsdk`, and `mendixplatformsdk` as dependencies.
67+
3. Add `mendixmodelsdk` and `mendixplatformsdk` as dependencies.
6868
Dependencies are stored in the `node_modules` directory (which will be automatically created by `npm` if necessary). Open the *package.json* you just created. Add a [`dependencies` block](https://docs.npmjs.com/files/package.json#dependencies) that looks like this:
6969

7070
```json
@@ -74,10 +74,10 @@ To set up a working directory for your script, follow these steps:
7474
}
7575
```
7676

77-
When a new major version of the Mendix SDK is released (as in, 1.0.0 to 2.0.0) and you run `npm update` in your project folder, the `^` in front of the version number makes sure that the installed version of the SDK will not be upgraded automatically. Only minor and patch releases (as in, 1.1.1) of the SDK will be automatically upgraded; otherwise, your script could inadvertently be broken. You may, of course, edit the dependency by hand yourself.
77+
When a new major version of the Mendix SDK is released (as in, 1.0.0 to 2.0.0) and you run `npm update` in your project folder, the `^` in front of the version number makes sure that the installed version of the SDK will not be upgraded automatically. Only minor and patch releases (as in, 1.1.1) of the SDK will be automatically upgraded; otherwise, your script could inadvertently be broken. You may, of course, edit the dependency yourself.
7878

79-
4. Add `typescript`, and `@types/node` as dev dependencies.
80-
Packages like TypeScript, testing libraries, linters, and type definitions (@types/...) are not required for your app to run in production—they're only needed while writing and testing code.
79+
4. Add `typescript` and `@types/node` as dev dependencies.
80+
Packages like TypeScript, testing libraries, linters, and type definitions (@types/...) are not required for your app to run in production—they are only needed while writing and testing code.
8181

8282
```json
8383
"devDependencies": {
@@ -86,15 +86,15 @@ To set up a working directory for your script, follow these steps:
8686
}
8787
```
8888

89-
5. Save your changes and then execute the following to install the dependencies:
89+
5. Save your changes and then run the following command to install the dependencies:
9090

9191
```bash
9292
$ npm install
9393
```
9494

9595
If you are using version control, make sure to ignore the `node_modules` directory, otherwise you end up committing dependencies.
9696

97-
6. In Code, create a [tsconfig.json](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) file next to your *package.json*. The *tsconfig.json* file is used by the TypeScript compiler to compile your code in the proper manner to a JS file. Create it with the following contents.
97+
6. In VS Code, create a [tsconfig.json](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) file in the same directory of *package.json*. The *tsconfig.json* file is used by the TypeScript compiler to compile your code in a proper manner to a JavaScript file. Add the following contents to the *tsconfig.json* file:
9898

9999
```json
100100
{
@@ -112,7 +112,7 @@ To set up a working directory for your script, follow these steps:
112112

113113
The compiler options should be left as-is. The `files` directive is an array of strings with path names of all TypeScript files that make up your Node.js script or app. You can change it so that the compiler uses the right files.
114114

115-
Create new files in your app directory with Visual Studio Code by hovering over the name of the working directory in the left-side pane. When the **New file** icon appears, click it to create a new file. For more information on basic editing with VSC, see [Basic Editing](https://code.visualstudio.com/Docs/editor/codebasics).
115+
Create new files in your app directory with VS Code by hovering over the name of the working directory in the left-side pane. When the **New file** icon appears, click it to create a new file. For more information on basic editing with VS Code, see [Basic Editing](https://code.visualstudio.com/Docs/editor/codebasics).
116116

117117
## Next Step
118118

0 commit comments

Comments
 (0)