├── .github └── workflows │ ├── publish.yml │ └── verify.yml ├── .gitignore ├── .releaserc.yml ├── .vscode ├── extensions.json ├── launch.json ├── settings.json └── tasks.json ├── .vscodeignore ├── CHANGELOG.md ├── README.md ├── images ├── command.png ├── icon.pdn ├── icon.png └── result.png ├── package-lock.json ├── package.json ├── src ├── convertThemeToScheme.ts ├── extension.ts └── test │ ├── runTest.ts │ └── suite │ ├── convertThemeToScheme.test.ts │ ├── extension.test.ts │ └── index.ts ├── tsconfig.json ├── tslint.json └── vsc-extension-quickstart.md /.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | name: Publish 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | 8 | jobs: 9 | publish: 10 | name: Publish all packages 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - name: Checkout code 15 | uses: actions/checkout@v2 16 | 17 | - name: Cache node modules 18 | uses: actions/cache@v2 19 | with: 20 | path: ~/.npm 21 | key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} 22 | restore-keys: | 23 | ${{ runner.os }}-npm- 24 | 25 | - name: Install dependencies 26 | run: npm ci 27 | 28 | - name: Release with semantic-release 29 | run: npm run release 30 | env: 31 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 32 | VSCE_PAT: ${{ secrets.VSCE_PAT }} 33 | -------------------------------------------------------------------------------- /.github/workflows/verify.yml: -------------------------------------------------------------------------------- 1 | name: Verify 2 | 3 | on: pull_request 4 | 5 | jobs: 6 | verify: 7 | name: Verify all packages 8 | strategy: 9 | matrix: 10 | os: [ubuntu-latest, windows-latest, macos-latest] 11 | runs-on: ${{ matrix.os }} 12 | steps: 13 | - name: Checkout code 14 | uses: actions/checkout@v2 15 | 16 | - name: Cache node modules 17 | uses: actions/cache@v2 18 | with: 19 | path: ~/.npm 20 | key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} 21 | restore-keys: | 22 | ${{ runner.os }}-npm- 23 | 24 | - name: Install dependencies 25 | run: npm ci 26 | 27 | - name: Build 28 | run: npm run compile 29 | 30 | - name: Test (Linux) 31 | run: xvfb-run -a npm test 32 | if: runner.os == 'Linux' 33 | 34 | - name: Test (Windows & Mac) 35 | run: npm test 36 | if: runner.os != 'Linux' 37 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | out 2 | node_modules 3 | .vscode-test/ 4 | *.vsix 5 | -------------------------------------------------------------------------------- /.releaserc.yml: -------------------------------------------------------------------------------- 1 | plugins: 2 | - '@semantic-release/commit-analyzer' 3 | - '@semantic-release/release-notes-generator' 4 | - ['semantic-release-vsce', { packageVsix: true }] 5 | - ['@semantic-release/github', { assets: ['*.vsix'] }] 6 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | // See http://go.microsoft.com/fwlink/?LinkId=827846 3 | // for the documentation about the extensions.json format 4 | "recommendations": [ 5 | "ms-vscode.vscode-typescript-tslint-plugin" 6 | ] 7 | } -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | // A launch configuration that compiles the extension and then opens it inside a new window 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | { 6 | "version": "0.2.0", 7 | "configurations": [ 8 | { 9 | "name": "Run Extension", 10 | "type": "extensionHost", 11 | "request": "launch", 12 | "runtimeExecutable": "${execPath}", 13 | "args": [ 14 | "--extensionDevelopmentPath=${workspaceFolder}" 15 | ], 16 | "outFiles": [ 17 | "${workspaceFolder}/out/**/*.js" 18 | ], 19 | "preLaunchTask": "npm: watch" 20 | }, 21 | { 22 | "name": "Extension Tests", 23 | "type": "extensionHost", 24 | "request": "launch", 25 | "runtimeExecutable": "${execPath}", 26 | "args": [ 27 | "--extensionDevelopmentPath=${workspaceFolder}", 28 | "--extensionTestsPath=${workspaceFolder}/out/test/suite/index" 29 | ], 30 | "outFiles": [ 31 | "${workspaceFolder}/out/test/**/*.js" 32 | ], 33 | "preLaunchTask": "npm: watch" 34 | } 35 | ] 36 | } 37 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | // Place your settings in this file to overwrite default and user settings. 2 | { 3 | "files.exclude": { 4 | "out": false // set this to true to hide the "out" folder with the compiled JS files 5 | }, 6 | "search.exclude": { 7 | "out": true // set this to false to include "out" folder in search results 8 | }, 9 | // Turn off tsc task auto detection since we have the necessary tasks as npm scripts 10 | "typescript.tsc.autoDetect": "off" 11 | } -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | // See https://go.microsoft.com/fwlink/?LinkId=733558 2 | // for the documentation about the tasks.json format 3 | { 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "type": "npm", 8 | "script": "watch", 9 | "problemMatcher": "$tsc-watch", 10 | "isBackground": true, 11 | "presentation": { 12 | "reveal": "never" 13 | }, 14 | "group": { 15 | "kind": "build", 16 | "isDefault": true 17 | } 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/** 2 | .vscode-test/** 3 | out/test/** 4 | src/** 5 | .gitignore 6 | vsc-extension-quickstart.md 7 | **/tsconfig.json 8 | **/tslint.json 9 | **/*.map 10 | **/*.ts -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | All notable changes to the "generate-wt-scheme" extension will be documented in this file. 4 | 5 | Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file. 6 | 7 | ## [Unreleased] 8 | 9 | - Initial release -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Generate Windows Terminal Scheme 2 | 3 | Provides a command to generate a Windows Terminal color scheme from your currently active 4 | VSCode color theme, to enable easily matching WT with VSCode for beautiful dev 5 | environments. 6 | 7 | ![Result](./images/result.png) 8 | 9 | _Using the [Night Owl](https://marketplace.visualstudio.com/items?itemName=sdras.night-owl) theme_ 10 | 11 | ## Usage 12 | 13 | First, run the `Generate Windows Terminal Scheme` command: 14 | 15 | ![Command](./images/command.png) 16 | 17 | You will be prompted to enter the theme name because unfortunately at this time there is 18 | no VSCode API to get the name of the current active theme (if you know of one, please let 19 | me know!). 20 | 21 | Once it completes, the result will be automatically copied to your clipboard. 22 | 23 | Now open your WT settings file (`Ctrl+,` in WT by default), and paste the JSON into the `schemes` array. 24 | 25 | See the 26 | [docs](https://docs.microsoft.com/en-us/windows/terminal/customize-settings/color-schemes) 27 | for more info on using WT color schemes. 28 | -------------------------------------------------------------------------------- /images/command.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blake-mealey/vscode-generate-wt-scheme/c53e6c23880efe9c8eee86da03923aeab5d93b80/images/command.png -------------------------------------------------------------------------------- /images/icon.pdn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blake-mealey/vscode-generate-wt-scheme/c53e6c23880efe9c8eee86da03923aeab5d93b80/images/icon.pdn -------------------------------------------------------------------------------- /images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blake-mealey/vscode-generate-wt-scheme/c53e6c23880efe9c8eee86da03923aeab5d93b80/images/icon.png -------------------------------------------------------------------------------- /images/result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/blake-mealey/vscode-generate-wt-scheme/c53e6c23880efe9c8eee86da03923aeab5d93b80/images/result.png -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "generate-wt-scheme", 3 | "publisher": "blake-mealey", 4 | "displayName": "Generate Windows Terminal Scheme", 5 | "description": "Generate Windows Terminal color schemes from your VSCode themes", 6 | "icon": "images/icon.png", 7 | "version": "0.0.0-development", 8 | "private": true, 9 | "repository": { 10 | "type": "git", 11 | "url": "https://github.com/blake-mealey/vscode-generate-wt-scheme.git" 12 | }, 13 | "engines": { 14 | "vscode": "^1.45.0" 15 | }, 16 | "categories": [ 17 | "Other" 18 | ], 19 | "activationEvents": [ 20 | "onCommand:extension.generate-wt-scheme.generate-scheme" 21 | ], 22 | "main": "./out/extension.js", 23 | "contributes": { 24 | "commands": [ 25 | { 26 | "command": "extension.generate-wt-scheme.generate-scheme", 27 | "title": "Generate Windows Terminal Scheme" 28 | } 29 | ] 30 | }, 31 | "scripts": { 32 | "vscode:prepublish": "npm run compile", 33 | "compile": "tsc -p ./", 34 | "watch": "tsc -watch -p ./", 35 | "pretest": "npm run compile", 36 | "test": "node ./out/test/runTest.js", 37 | "release": "semantic-release" 38 | }, 39 | "devDependencies": { 40 | "@types/glob": "^7.1.1", 41 | "@types/mocha": "^5.2.6", 42 | "@types/node": "^10.12.21", 43 | "@types/vscode": "^1.45.0", 44 | "glob": "^7.1.4", 45 | "mocha": "^6.1.4", 46 | "prettier": "^2.2.1", 47 | "semantic-release": "^17.4.2", 48 | "semantic-release-vsce": "^3.3.0", 49 | "tslint": "^5.12.1", 50 | "typescript": "^3.3.1", 51 | "vscode-test": "^1.2.0" 52 | }, 53 | "dependencies": { 54 | "change-case": "^4.1.1" 55 | }, 56 | "prettier": { 57 | "singleQuote": false 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/convertThemeToScheme.ts: -------------------------------------------------------------------------------- 1 | import { camelCase } from "change-case"; 2 | 3 | const ansiPrefix = "ansi"; 4 | 5 | const replacements: Record = { 6 | magenta: "purple", 7 | brightMagenta: "brightPurple", 8 | }; 9 | 10 | const include = [ 11 | "black", 12 | "blue", 13 | "cyan", 14 | "green", 15 | "purple", 16 | "red", 17 | "white", 18 | "yellow", 19 | "brightBlack", 20 | "brightBlue", 21 | "brightCyan", 22 | "brightGreen", 23 | "brightPurple", 24 | "brightRed", 25 | "brightWhite", 26 | "brightYellow", 27 | "background", 28 | "foreground", 29 | "selectionBackground", 30 | "cursorColor", 31 | ]; 32 | 33 | export function convertThemeToScheme(theme: any, name: string) { 34 | const colors = theme.colors as Record; 35 | 36 | const scheme = { 37 | name: name, 38 | background: colors["editor.background"], 39 | foreground: colors["editor.foreground"], 40 | cursorColor: colors["editorCursor.foreground"], 41 | ...Object.fromEntries( 42 | Object.entries(colors) 43 | .filter(([key, value]) => key.startsWith("terminal.") && !!value) 44 | .map(([key, value]) => { 45 | // remove key prefixes 46 | key = key.split(".")[1]; 47 | if (key.startsWith(ansiPrefix)) { 48 | key = camelCase(key.substring(ansiPrefix.length)); 49 | } 50 | 51 | // replace keys that have different names 52 | const replacement = replacements[key]; 53 | if (replacement) { 54 | key = replacement; 55 | } 56 | 57 | // chop off alpha channel from values 58 | if (value.match(/#\w{8}/)) { 59 | value = value.substr(0, 7); 60 | } 61 | 62 | return [key, value]; 63 | }) 64 | .filter(([key]) => include.includes(key)) 65 | ), 66 | }; 67 | 68 | return scheme; 69 | } 70 | -------------------------------------------------------------------------------- /src/extension.ts: -------------------------------------------------------------------------------- 1 | import * as vscode from "vscode"; 2 | import { convertThemeToScheme } from "./convertThemeToScheme"; 3 | 4 | async function promptThemeName() { 5 | return vscode.window.showInputBox({ 6 | placeHolder: "Theme Name", 7 | }); 8 | } 9 | 10 | async function getActiveColorTheme(): Promise { 11 | await vscode.commands.executeCommand("workbench.action.generateColorTheme"); 12 | 13 | const editor = vscode.window.activeTextEditor; 14 | if (!editor) { 15 | return; 16 | } 17 | 18 | // Uncomment lines that are commented so that if we are missing values, we will get the 19 | // defaults instead 20 | const themeText = editor.document.getText().replace(/\/\//g, ""); 21 | 22 | return JSON.parse(themeText); 23 | } 24 | 25 | async function replaceEditorText(text: string) { 26 | const editor = vscode.window.activeTextEditor; 27 | if (!editor) { 28 | return; 29 | } 30 | 31 | return editor.edit((editBuilder) => { 32 | const firstLine = editor.document.lineAt(0); 33 | const lastLine = editor.document.lineAt(editor.document.lineCount - 1); 34 | const range = new vscode.Range(firstLine.range.start, lastLine.range.end); 35 | 36 | editBuilder.replace(range, text); 37 | }); 38 | } 39 | 40 | export function activate(context: vscode.ExtensionContext) { 41 | const disposable = vscode.commands.registerCommand( 42 | "extension.generate-wt-scheme.generate-scheme", 43 | async (themeName) => { 44 | // Prompt the user for a theme name 45 | themeName = themeName ?? (await promptThemeName()); 46 | if (!themeName) { 47 | return; 48 | } 49 | 50 | const theme = await getActiveColorTheme(); 51 | if (!theme) { 52 | return; 53 | } 54 | 55 | const scheme = convertThemeToScheme(theme, themeName); 56 | const schemeText = JSON.stringify(scheme, null, 2); 57 | 58 | const success = await replaceEditorText(schemeText); 59 | if (success) { 60 | await vscode.env.clipboard.writeText(schemeText); 61 | 62 | vscode.window.showInformationMessage( 63 | "The scheme has been generated and copied to your clipboard!" 64 | ); 65 | } 66 | } 67 | ); 68 | 69 | context.subscriptions.push(disposable); 70 | } 71 | 72 | // this method is called when your extension is deactivated 73 | export function deactivate() {} 74 | -------------------------------------------------------------------------------- /src/test/runTest.ts: -------------------------------------------------------------------------------- 1 | import * as path from 'path'; 2 | 3 | import { runTests } from 'vscode-test'; 4 | 5 | async function main() { 6 | try { 7 | // The folder containing the Extension Manifest package.json 8 | // Passed to `--extensionDevelopmentPath` 9 | const extensionDevelopmentPath = path.resolve(__dirname, '../../'); 10 | 11 | // The path to test runner 12 | // Passed to --extensionTestsPath 13 | const extensionTestsPath = path.resolve(__dirname, './suite/index'); 14 | 15 | // Download VS Code, unzip it and run the integration test 16 | await runTests({ extensionDevelopmentPath, extensionTestsPath }); 17 | } catch (err) { 18 | console.error('Failed to run tests'); 19 | process.exit(1); 20 | } 21 | } 22 | 23 | main(); 24 | -------------------------------------------------------------------------------- /src/test/suite/convertThemeToScheme.test.ts: -------------------------------------------------------------------------------- 1 | import * as assert from "assert"; 2 | import { convertThemeToScheme } from "../../convertThemeToScheme"; 3 | 4 | suite("Convert", () => { 5 | test("Converts theme correctly", () => { 6 | const theme = { 7 | $schema: "vscode://schemas/color-theme", 8 | type: "dark", 9 | colors: { 10 | "editor.background": "#011627", 11 | "editor.foreground": "#d6deeb", 12 | "editorCursor.foreground": "#80a4c2", 13 | "terminal.ansiBlack": "#011627", 14 | "terminal.ansiBlue": "#82aaff", 15 | "terminal.ansiBrightBlack": "#575656", 16 | "terminal.ansiBrightBlue": "#82aaff", 17 | "terminal.ansiBrightCyan": "#7fdbca", 18 | "terminal.ansiBrightGreen": "#22da6e", 19 | "terminal.ansiBrightMagenta": "#c792ea", 20 | "terminal.ansiBrightRed": "#ef5350", 21 | "terminal.ansiBrightWhite": "#ffffff", 22 | "terminal.ansiBrightYellow": "#ffeb95", 23 | "terminal.ansiCyan": "#21c7a8", 24 | "terminal.ansiGreen": "#22da6e", 25 | "terminal.ansiMagenta": "#c792ea", 26 | "terminal.ansiRed": "#ef5350", 27 | "terminal.ansiWhite": "#ffffff", 28 | "terminal.ansiYellow": "#addb67", 29 | "terminal.selectionBackground": "#1b90dd4d", 30 | "terminal.foreground": "#cccccc", // should use the terminal foreground if available 31 | "terminal.background": null, // should ignore the terminal background if its value is null 32 | "terminalCursor.background": "#234d70", 33 | "terminal.border": "#abcdef", 34 | "terminal.dropBackground": "#abcdef", // should ignore the following values 35 | "terminal.findMatchBackground": "#abcdef", 36 | "terminal.findMatchHighlightBackground": "#abcdef", 37 | "terminal.tab": "#abcdef", 38 | "terminal.hoverHighlightBackground": "#abcdef", 39 | "terminal.inactiveSelectionBackground": "#abcdef", 40 | }, 41 | }; 42 | 43 | const name = "test"; 44 | const scheme = convertThemeToScheme(theme, name); 45 | 46 | assert.deepStrictEqual(scheme, { 47 | name, 48 | background: "#011627", 49 | foreground: "#cccccc", 50 | cursorColor: "#80a4c2", 51 | black: "#011627", 52 | blue: "#82aaff", 53 | brightBlack: "#575656", 54 | brightBlue: "#82aaff", 55 | brightCyan: "#7fdbca", 56 | brightGreen: "#22da6e", 57 | brightPurple: "#c792ea", 58 | brightRed: "#ef5350", 59 | brightWhite: "#ffffff", 60 | brightYellow: "#ffeb95", 61 | cyan: "#21c7a8", 62 | green: "#22da6e", 63 | purple: "#c792ea", 64 | red: "#ef5350", 65 | white: "#ffffff", 66 | yellow: "#addb67", 67 | selectionBackground: "#1b90dd", 68 | }); 69 | }); 70 | }); 71 | -------------------------------------------------------------------------------- /src/test/suite/extension.test.ts: -------------------------------------------------------------------------------- 1 | import * as assert from "assert"; 2 | import * as vscode from "vscode"; 3 | 4 | suite("Extension Test Suite", () => { 5 | vscode.window.showInformationMessage("Start all tests."); 6 | 7 | test("Generates successfully", async () => { 8 | const themeName = "test"; 9 | 10 | await vscode.commands.executeCommand( 11 | "extension.generate-wt-scheme.generate-scheme", 12 | themeName 13 | ); 14 | 15 | const editor = vscode.window.activeTextEditor; 16 | assert.notStrictEqual(editor, undefined); 17 | 18 | const editorText = editor!.document.getText(); 19 | 20 | const scheme = JSON.parse(editorText); 21 | assert.strictEqual(scheme.name, themeName); 22 | 23 | const clipboardText = await vscode.env.clipboard.readText(); 24 | assert.deepStrictEqual(clipboardText, editorText); 25 | }); 26 | }); 27 | -------------------------------------------------------------------------------- /src/test/suite/index.ts: -------------------------------------------------------------------------------- 1 | import * as path from "path"; 2 | import Mocha from "mocha"; 3 | import glob from "glob"; 4 | 5 | export function run(): Promise { 6 | // Create the mocha test 7 | const mocha = new Mocha({ 8 | ui: "tdd", 9 | timeout: 5000, 10 | }); 11 | mocha.useColors(true); 12 | 13 | const testsRoot = path.resolve(__dirname, ".."); 14 | 15 | return new Promise((c, e) => { 16 | glob("**/**.test.js", { cwd: testsRoot }, (err, files) => { 17 | if (err) { 18 | return e(err); 19 | } 20 | 21 | // Add files to the test suite 22 | files.forEach((f) => mocha.addFile(path.resolve(testsRoot, f))); 23 | 24 | try { 25 | // Run the mocha test 26 | mocha.run((failures) => { 27 | if (failures > 0) { 28 | e(new Error(`${failures} tests failed.`)); 29 | } else { 30 | c(); 31 | } 32 | }); 33 | } catch (err) { 34 | e(err); 35 | } 36 | }); 37 | }); 38 | } 39 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es6", 5 | "outDir": "out", 6 | "lib": ["es6", "ES2019.Object"], 7 | "sourceMap": true, 8 | "rootDir": "src", 9 | "esModuleInterop": true, 10 | "strict": true /* enable all strict type-checking options */ 11 | /* Additional Checks */ 12 | // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ 13 | // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ 14 | // "noUnusedParameters": true, /* Report errors on unused parameters. */ 15 | }, 16 | "exclude": ["node_modules", ".vscode-test"] 17 | } 18 | -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-string-throw": true, 4 | "no-unused-expression": true, 5 | "no-duplicate-variable": true, 6 | "curly": true, 7 | "class-name": true, 8 | "semicolon": [ 9 | true, 10 | "always" 11 | ], 12 | "triple-equals": true 13 | }, 14 | "defaultSeverity": "warning" 15 | } 16 | -------------------------------------------------------------------------------- /vsc-extension-quickstart.md: -------------------------------------------------------------------------------- 1 | # Welcome to your VS Code Extension 2 | 3 | ## What's in the folder 4 | 5 | * This folder contains all of the files necessary for your extension. 6 | * `package.json` - this is the manifest file in which you declare your extension and command. 7 | * The sample plugin registers a command and defines its title and command name. With this information VS Code can show the command in the command palette. It doesn’t yet need to load the plugin. 8 | * `src/extension.ts` - this is the main file where you will provide the implementation of your command. 9 | * The file exports one function, `activate`, which is called the very first time your extension is activated (in this case by executing the command). Inside the `activate` function we call `registerCommand`. 10 | * We pass the function containing the implementation of the command as the second parameter to `registerCommand`. 11 | 12 | ## Get up and running straight away 13 | 14 | * Press `F5` to open a new window with your extension loaded. 15 | * Run your command from the command palette by pressing (`Ctrl+Shift+P` or `Cmd+Shift+P` on Mac) and typing `Hello World`. 16 | * Set breakpoints in your code inside `src/extension.ts` to debug your extension. 17 | * Find output from your extension in the debug console. 18 | 19 | ## Make changes 20 | 21 | * You can relaunch the extension from the debug toolbar after changing code in `src/extension.ts`. 22 | * You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes. 23 | 24 | 25 | ## Explore the API 26 | 27 | * You can open the full set of our API when you open the file `node_modules/@types/vscode/index.d.ts`. 28 | 29 | ## Run tests 30 | 31 | * Open the debug viewlet (`Ctrl+Shift+D` or `Cmd+Shift+D` on Mac) and from the launch configuration dropdown pick `Extension Tests`. 32 | * Press `F5` to run the tests in a new window with your extension loaded. 33 | * See the output of the test result in the debug console. 34 | * Make changes to `src/test/suite/extension.test.ts` or create new test files inside the `test/suite` folder. 35 | * The provided test runner will only consider files matching the name pattern `**.test.ts`. 36 | * You can create folders inside the `test` folder to structure your tests any way you want. 37 | 38 | ## Go further 39 | 40 | * Reduce the extension size and improve the startup time by [bundling your extension](https://code.visualstudio.com/api/working-with-extensions/bundling-extension). 41 | * [Publish your extension](https://code.visualstudio.com/api/working-with-extensions/publishing-extension) on the VSCode extension marketplace. 42 | * Automate builds by setting up [Continuous Integration](https://code.visualstudio.com/api/working-with-extensions/continuous-integration). 43 | --------------------------------------------------------------------------------