Skip to content

Commit 4293111

Browse files
committed
Merge pull request #128 from rkeithhill/rkeithhill/add-build-tasks
Updated the build tasks.
2 parents cdc6eee + 9a2703c commit 4293111

File tree

3 files changed

+75
-28
lines changed

3 files changed

+75
-28
lines changed

.vscode/tasks.json

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,39 @@
1616
// the command is a shell script
1717
"isShellCommand": true,
1818

19-
// show the output window only if unrecognized errors occur.
20-
"showOutput": "silent",
19+
"tasks": [
20+
{
21+
"taskName": "install",
22+
"showOutput": "always"
23+
},
24+
{
25+
"taskName": "compile",
26+
"suppressTaskName": true,
2127

22-
// we run the custom script "compile" as defined in package.json
23-
"args": ["run", "compile"],
28+
// show the output window only if unrecognized errors occur.
29+
"showOutput": "silent",
2430

25-
// The tsc compiler is started in watching mode
26-
"isWatching": true,
31+
// we run the custom script "compile" as defined in package.json
32+
"args": ["run", "compile"],
2733

28-
// use the standard tsc in watch mode problem matcher to find compile problems in the output.
29-
"problemMatcher": "$tsc-watch"
30-
}
34+
// use the standard tsc problem matcher to find compile problems in the output.
35+
"problemMatcher": "$tsc"
36+
},
37+
{
38+
"taskName": "compile-watch",
39+
"suppressTaskName": true,
40+
41+
// show the output window only if unrecognized errors occur.
42+
"showOutput": "silent",
43+
44+
// we run the custom script "compile-watch" as defined in package.json
45+
"args": ["run", "compile-watch"],
46+
47+
// The tsc compiler is started in watching mode
48+
"isWatching": true,
49+
50+
// use the standard tsc in watch mode problem matcher to find compile problems in the output.
51+
"problemMatcher": "$tsc-watch"
52+
}
53+
]
54+
}

docs/development.md

Lines changed: 40 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,51 @@
22

33
## Building the code
44

5-
First, install the package dependencies:
5+
1. Install [Node.js](https://nodejs.org/en/) 4.4.1 or higher.
66

7-
```
8-
npm install
9-
```
7+
2. Install the package dependencies by running one of the following commands:
108

11-
Now you can compile the code:
9+
```
10+
# From a PowerShell prompt
11+
npm install
1212
13-
```
14-
npm run compile
15-
```
13+
# Or from Visual Studio Code
14+
Press Ctrl+P and type "task install"
15+
```
1616

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+
```
1941

2042
## Running the compiled code
2143

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+
```
2349

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.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@
4141
"scripts": {
4242
"postinstall": "node ./node_modules/vscode/bin/install",
4343
"vscode:prepublish": "node ./node_modules/vscode/bin/compile",
44-
"compile": "node ./node_modules/vscode/bin/compile -watch -p ./"
44+
"compile": "node ./node_modules/vscode/bin/compile -p ./",
45+
"compile-watch": "node ./node_modules/vscode/bin/compile -watch -p ./"
4546
},
4647
"contributes": {
4748
"keybindings": [

0 commit comments

Comments
 (0)