Terminal sample steps 2-4

This commit is contained in:
Daniel Imms
2018-10-24 14:10:03 -07:00
parent 4fffad9c14
commit 81850fcab3
5 changed files with 2528 additions and 9 deletions

View File

@ -0,0 +1,7 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"eg2.tslint"
]
}

View File

@ -1,10 +1,3 @@
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"out": false // set this to true to hide the "out" folder with the compiled JS files
},
"search.exclude": {
"out": true // set this to false to include "out" folder in search results
},
"typescript.tsdk": "./node_modules/typescript/lib" // we want to use the TS server from our node_modules folder to control its version
"editor.insertSpaces": false
}

View File

@ -1,3 +1,32 @@
# vscode-terminal-api-example
This repo demonstrates how to utilize the integrated terminal extension API. It targets VS Code v1.23, for earlier versions check the git history.
This sample provides several commands that demonstrates how to utilize the integrated terminal extension API. Access the commands through the command palette (F1).
![demo](demo.png)
## VS Code API
### `vscode` module
- [window.createTerminal](https://vscode-ext-docs.azurewebsites.net/api/references/vscode-api#window.createTerminal)
- [window.onDidChangeActiveTerminal](https://vscode-ext-docs.azurewebsites.net/api/references/vscode-api#window.onDidChangeActiveTerminal)
- [window.onDidCloseTerminal](https://vscode-ext-docs.azurewebsites.net/api/references/vscode-api#window.onDidCloseTerminal)
- [window.onDidOpenTerminal](https://vscode-ext-docs.azurewebsites.net/api/references/vscode-api#window.onDidOpenTerminal)
- [window.Terminal](https://vscode-ext-docs.azurewebsites.net/api/references/vscode-api#window.Terminal)
- [window.terminals](https://vscode-ext-docs.azurewebsites.net/api/references/vscode-api#window.terminals)
### Proposed API
- `window.createTerminalRenderer`
- `window.TerminalRenderer`
### Contribution Points
- [`contributes.commands`](https://code.visualstudio.com/docs/extensionAPI/extension-points#_contributescommands)
## Running the Sample
- Run `npm install` in terminal to install dependencies
- Run the `Run Extension` target in the Debug View. This will:
- Start a task `npm: watch` to compile the code
- Run the extension in a new VS Code window

BIN
terminal-sample/demo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

2490
terminal-sample/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff