Update sqlservices example for new webview messages API (#1569)

This commit is contained in:
Matt Irvine
2018-06-06 17:29:50 -07:00
committed by GitHub
parent b2b69376c4
commit 0bf642d200
4 changed files with 17 additions and 2 deletions

View File

@@ -1 +1,7 @@
This is a sample extension that will show some basic model-backed UI scenarios. The long-term goal is to use SQL Service querying (e.g. see if Agent and other services are running) and visualize in interesting ways. Additional suggestions for improving this sample are welcome.
This is a sample extension that will show some basic model-backed UI scenarios. The long-term goal is to use SQL Service querying (e.g. see if Agent and other services are running) and visualize in interesting ways. Additional suggestions for improving this sample are welcome.
## Useful development commands
- Download `sqlops` API typings for local development: `gulp copytypings`
- Install dependencies: `npm install`
- Compile: `gulp compile` or `gulp watch` to automatically recompile changes
- Package: `gulp package`. The packaged .vsix will be placed at `out/sqlservices.vsix`.

View File

@@ -99,5 +99,9 @@
"vscode": "^1.1.14",
"@types/handlebars": "^4.0.11",
"vsce": "1.36.2"
},
"repository": {
"type": "git",
"url": "https://github.com/Microsoft/sqlopsstudio/tree/master/samples/sqlservices"
}
}

View File

@@ -10,8 +10,9 @@
<body>
<button onclick="count()">Count</button>
<script>
const vscode = acquireVsCodeApi();
function count() {
parent.postMessage('count', '*');
vscode.postMessage('count', '*');
}
</script>
</body>

View File

@@ -34,3 +34,7 @@ let buildPackage = function(packageName) {
console.log(command);
return exec(command);
};
gulp.task('package', async () => {
await buildPackage('out/sqlservices.vsix');
});