|
1 | | -# Working with the PowerShell extension code |
| 1 | +# Development Instructions for the PowerShell Extension |
2 | 2 |
|
3 | | -## Building the code |
| 3 | +## Development Setup |
4 | 4 |
|
5 | | -1. Install [Node.js](https://nodejs.org/en/) 4.4.1 or higher. |
| 5 | +You'll need to clone two repositories and set up your development environment |
| 6 | +to before you can proceed. |
6 | 7 |
|
7 | | -2. Install the package dependencies by running one of the following commands: |
| 8 | +### 1. [Fork and clone](https://help.github.com/articles/fork-a-repo/) the [vscode-powershell repository](https://github.com/PowerShell/vscode-powershell) |
8 | 9 |
|
9 | | - ``` |
10 | | - # From a PowerShell prompt |
11 | | - npm install |
| 10 | +### 2. [Fork and clone](https://help.github.com/articles/fork-a-repo/) the [PowerShell Editor Services repository](https://github.com/PowerShell/PowerShellEditorServices) |
12 | 11 |
|
13 | | - # Or from Visual Studio Code |
14 | | - Press Ctrl+P and type "task install" |
15 | | - ``` |
| 12 | +### 3. Follow the [development instructions](https://github.com/PowerShell/PowerShellEditorServices#development) for PowerShell Editor Services |
16 | 13 |
|
17 | | -3. Compile the code by running one of the following commands: |
| 14 | +### 4. Install [Visual Studio Code Insiders Release](https://code.visualstudio.com/insiders) |
18 | 15 |
|
19 | | - ``` |
20 | | - # From a PowerShell prompt |
21 | | - npm run compile |
| 16 | +### 5. Install [Node.js](https://nodejs.org/en/) 4.4.1 or higher. |
22 | 17 |
|
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. |
| 18 | +## Building the Code |
27 | 19 |
|
28 | | - OR |
| 20 | +#### From Visual Studio Code: |
29 | 21 |
|
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: |
| 22 | +Press <kbd>Ctrl+P</kbd> and type `task build` |
33 | 23 |
|
34 | | - ``` |
35 | | - # From a PowerShell prompt |
36 | | - npm run compile-watch |
| 24 | +This will compile the TypeScript files in the project to JavaScript files. |
37 | 25 |
|
38 | | - # Or from Visual Studio Code |
39 | | - Press Ctrl+P and type "task compile-watch" |
40 | | - ``` |
| 26 | +#### From a command prompt: |
41 | 27 |
|
42 | | -## Running the compiled code |
| 28 | +``` |
| 29 | +Invoke-Build Build |
| 30 | +``` |
43 | 31 |
|
44 | | -1. From a PowerShell prompt, run the following command: |
| 32 | +## Launching the extension |
45 | 33 |
|
46 | | - ``` |
47 | | - code --extensionDevelopmentPath="c:\path\to\vscode-powershell" . |
48 | | - ``` |
| 34 | +#### From Visual Studio Code: |
49 | 35 |
|
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. |
| 36 | +To debug the extension, press <kbd>F5</kbd>. To run the extension without debugging, |
| 37 | +press <kbd>Ctrl+F5</kbd> or <kbd>Cmd+F5</kbd> on macOS. |
| 38 | + |
| 39 | +#### From a command prompt: |
| 40 | + |
| 41 | +``` |
| 42 | +code --extensionDevelopmentPath="c:\path\to\vscode-powershell" . |
| 43 | +``` |
0 commit comments