From 30e82227174f20ea72f99209de0b3524d7493a6d Mon Sep 17 00:00:00 2001 From: Josh Johnson Date: Sun, 22 Nov 2015 01:48:40 -0500 Subject: [PATCH] Debug Configs --- .vscode/launch.json | 18 ++++++++++++++++++ .vscode/settings.json | 8 ++++++++ .vscode/tasks.json | 17 +++++++++++++++++ src/main.ts | 7 ++++++- 4 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json create mode 100644 .vscode/tasks.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..a3d5a26 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,18 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Launch Extension", + "type": "extensionHost", + "request": "launch", + "runtimeExecutable": "${execPath}", + "args": [ + "--extensionDevelopmentPath=${workspaceRoot}" + ], + "stopOnEntry": false, + "sourceMaps": true, + "outDir": "out", + "preLaunchTask": "npm" + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..f8edaaa --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,8 @@ +// Place your settings in this file to overwrite default and user settings. +{ + "files.exclude": { + "**/.git": true, + "**/.DS_Store": true, + "**/*.js": {"when": "$(basename).ts"} + } +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..914176d --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,17 @@ +// Available variables which can be used inside of strings. +// ${workspaceRoot}: the root folder of the team +// ${file}: the current opened file +// ${fileBasename}: the current opened file's basename +// ${fileDirname}: the current opened file's dirname +// ${fileExtname}: the current opened file's extension +// ${cwd}: the current working directory of the spawned process + +{ + "version": "0.1.0", + "command": "npm", + "isShellCommand": true, + "showOutput": "silent", + "args": ["run", "compile"], + "isWatching": true, + "problemMatcher": "$tsc-watch" +} \ No newline at end of file diff --git a/src/main.ts b/src/main.ts index 22d43c8..d376fb6 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,7 +1,12 @@ 'use strict'; -import { ExtensionContext } from 'vscode'; +import { commands, ExtensionContext } from 'vscode'; +import { formatXml } from './features/xmlFormatting'; export function activate(ctx: ExtensionContext) { + // check for update + //... + // register pallete commands + ctx.subscriptions.push(commands.registerTextEditorCommand('xmltools.formatXml', formatXml)); } \ No newline at end of file