Skip to content

Updated the build tasks. #128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 27, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 33 additions & 9 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,39 @@
// the command is a shell script
"isShellCommand": true,

// show the output window only if unrecognized errors occur.
"showOutput": "silent",
"tasks": [
{
"taskName": "install",
"showOutput": "always"
},
{
"taskName": "compile",
"suppressTaskName": true,

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

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

// use the standard tsc in watch mode problem matcher to find compile problems in the output.
"problemMatcher": "$tsc-watch"
}
// use the standard tsc problem matcher to find compile problems in the output.
"problemMatcher": "$tsc"
},
{
"taskName": "compile-watch",
"suppressTaskName": true,

// show the output window only if unrecognized errors occur.
"showOutput": "silent",

// we run the custom script "compile-watch" as defined in package.json
"args": ["run", "compile-watch"],

// The tsc compiler is started in watching mode
"isWatching": true,

// use the standard tsc in watch mode problem matcher to find compile problems in the output.
"problemMatcher": "$tsc-watch"
}
]
}
58 changes: 40 additions & 18 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,51 @@

## Building the code

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

```
npm install
```
2. Install the package dependencies by running one of the following commands:

Now you can compile the code:
```
# From a PowerShell prompt
npm install

```
npm run compile
```
# Or from Visual Studio Code
Press Ctrl+P and type "task install"
```

After the initial compile, the source files will be watched and recompiled
when changes are saved.
3. Compile the code by running one of the following commands:

```
# From a PowerShell prompt
npm run compile

# Or from Visual Studio Code
Press Ctrl+P and type "task compile"
```
This will compile the TypeScript files in the project to JavaScript files.

OR

You can compile the files and then have the TypeScript compiler watch for changes to
the source files and automatically recompile those files when changes are saved.
To do this, run one of the following commands:

```
# From a PowerShell prompt
npm run compile-watch

# Or from Visual Studio Code
Press Ctrl+P and type "task compile-watch"
```

## Running the compiled code

From a PowerShell or cmd.exe prompt, run the following command:
1. From a PowerShell prompt, run the following command:

```
code --extensionDevelopmentPath="c:\path\to\vscode-powershell" .
```

```
code --extensionDevelopmentPath="c:\path\to\vscode-powershell" .
```

If you allow the compiler to continue watching for file changes, you can use
the `Reload Window` command found in the command palette `(Ctrl+Shift+P)`
so that the new source files are loaded.
2. If you allow the compiler to continue watching for file changes, you can use
the `Reload Window` command found in the command palette `(Ctrl+Shift+P)`
so that the new source files are loaded.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
"scripts": {
"postinstall": "node ./node_modules/vscode/bin/install",
"vscode:prepublish": "node ./node_modules/vscode/bin/compile",
"compile": "node ./node_modules/vscode/bin/compile -watch -p ./"
"compile": "node ./node_modules/vscode/bin/compile -p ./",
"compile-watch": "node ./node_modules/vscode/bin/compile -watch -p ./"
},
"contributes": {
"keybindings": [
Expand Down