|
2 | 2 |
|
3 | 3 | ## Building the code |
4 | 4 |
|
5 | | -First, install the package dependencies: |
| 5 | +1. Install [Node.js](https://nodejs.org/en/) 4.4.1 or higher. |
6 | 6 |
|
7 | | -``` |
8 | | -npm install |
9 | | -``` |
| 7 | +2. Install the package dependencies by running one of the following commands: |
10 | 8 |
|
11 | | -Now you can compile the code: |
| 9 | + ``` |
| 10 | + # From a PowerShell prompt |
| 11 | + npm install |
12 | 12 |
|
13 | | -``` |
14 | | -npm run compile |
15 | | -``` |
| 13 | + # Or from Visual Studio Code |
| 14 | + Press Ctrl+P and type "task install" |
| 15 | + ``` |
16 | 16 |
|
17 | | -After the initial compile, the source files will be watched and recompiled |
18 | | -when changes are saved. |
| 17 | +3. Compile the code by running one of the following commands: |
| 18 | + |
| 19 | + ``` |
| 20 | + # From a PowerShell prompt |
| 21 | + npm run compile |
| 22 | +
|
| 23 | + # Or from Visual Studio Code |
| 24 | + Press Ctrl+P and type "task compile" |
| 25 | + ``` |
| 26 | + This will compile the TypeScript files in the project to JavaScript files. |
| 27 | + |
| 28 | + OR |
| 29 | + |
| 30 | + You can compile the files and then have the TypeScript compiler watch for changes to |
| 31 | + the source files and automatically recompile those files when changes are saved. |
| 32 | + To do this, run one of the following commands: |
| 33 | + |
| 34 | + ``` |
| 35 | + # From a PowerShell prompt |
| 36 | + npm run compile-watch |
| 37 | +
|
| 38 | + # Or from Visual Studio Code |
| 39 | + Press Ctrl+P and type "task compile-watch" |
| 40 | + ``` |
19 | 41 |
|
20 | 42 | ## Running the compiled code |
21 | 43 |
|
22 | | -From a PowerShell or cmd.exe prompt, run the following command: |
| 44 | +1. From a PowerShell prompt, run the following command: |
| 45 | + |
| 46 | + ``` |
| 47 | + code --extensionDevelopmentPath="c:\path\to\vscode-powershell" . |
| 48 | + ``` |
23 | 49 |
|
24 | | -``` |
25 | | -code --extensionDevelopmentPath="c:\path\to\vscode-powershell" . |
26 | | -``` |
27 | | - |
28 | | -If you allow the compiler to continue watching for file changes, you can use |
29 | | -the `Reload Window` command found in the command palette `(Ctrl+Shift+P)` |
30 | | -so that the new source files are loaded. |
| 50 | +2. If you allow the compiler to continue watching for file changes, you can use |
| 51 | + the `Reload Window` command found in the command palette `(Ctrl+Shift+P)` |
| 52 | + so that the new source files are loaded. |
0 commit comments