Update sample, add textdocument-decorator sample to main project

This commit is contained in:
Martin Aeschlimann
2016-03-24 16:20:18 +01:00
parent 451d9a8589
commit e62e01775e
5 changed files with 68 additions and 3 deletions

13
.vscode/launch.json vendored
View File

@ -10,8 +10,19 @@
"args": ["--extensionDevelopmentPath=${workspaceRoot}/decorator-sample" ],
"stopOnEntry": false,
"sourceMaps": true,
"outDir": "decorator-sample/out",
"outDir": "${workspaceRoot}/decorator-sample/out",
"preLaunchTask": "compile-decorator"
},
{
"name": "Launch Document Provider Sample",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceRoot}/textdocumentprovider-sample" ],
"stopOnEntry": false,
"sourceMaps": true,
"outDir": "${workspaceRoot}/textdocumentprovider-sample/out",
"preLaunchTask": "compile-textdocumentprovider"
}
]
}

13
.vscode/tasks.json vendored
View File

@ -30,6 +30,19 @@
// 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"
},
{
// in package.json we have a compile task for each example
"taskName": "compile-textdocumentprovider",
// show the output window only if unrecognized errors occur.
"showOutput": "silent",
// 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"
}

18
decorator-sample/.vscode/launch.json vendored Normal file
View File

@ -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": "${workspaceRoot}/out",
"preLaunchTask": "npm"
}
]
}

22
decorator-sample/.vscode/tasks.json vendored Normal file
View File

@ -0,0 +1,22 @@
// A task runner that calls a custom npm script that compiles the extension.
{
"version": "0.1.0",
// we want to run npm
"command": "npm",
// the command is a shell script
"isShellCommand": true,
// show the output window only if unrecognized errors occur.
"showOutput": "silent",
// we run the custom script "compile" as defined in package.json
"args": ["run", "compile"],
// 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"
}

View File

@ -2,7 +2,8 @@
"name": "vsc-extension-samples",
"publisher": "Microsoft",
"scripts": {
"install-all": "cd decorator-sample && npm install && cd ..",
"compile-decorator": "cd decorator-sample && npm run compile"
"install-all": "npm --prefix decorator-sample install decorator-sample && npm --prefix textdocumentprovider-sample install textdocumentprovider-sample",
"compile-decorator": "cd decorator-sample && npm run compile",
"compile-textdocumentprovider": "cd textdocumentprovider-sample && npm run compile"
}
}