diff --git a/task-provider-sample/package.json b/task-provider-sample/package.json index a6c9ea84..11b33de5 100644 --- a/task-provider-sample/package.json +++ b/task-provider-sample/package.json @@ -5,7 +5,7 @@ "version": "0.0.1", "publisher": "ms-vscode", "engines": { - "vscode": "^1.23.0" + "vscode": "^1.26.0" }, "categories": [ "Other" diff --git a/task-provider-sample/src/extension.ts b/task-provider-sample/src/extension.ts index b1ceba8e..883c7337 100644 --- a/task-provider-sample/src/extension.ts +++ b/task-provider-sample/src/extension.ts @@ -22,7 +22,7 @@ export function activate(_context: vscode.ExtensionContext): void { fileWatcher.onDidChange(() => rakePromise = undefined); fileWatcher.onDidCreate(() => rakePromise = undefined); fileWatcher.onDidDelete(() => rakePromise = undefined); - taskProvider = vscode.workspace.registerTaskProvider('rake', { + taskProvider = vscode.tasks.registerTaskProvider('rake', { provideTasks: () => { if (!rakePromise) { rakePromise = getRakeTasks(); @@ -69,7 +69,14 @@ function getOutputChannel(): vscode.OutputChannel { } interface RakeTaskDefinition extends vscode.TaskDefinition { + /** + * The task name + */ task: string; + + /** + * The rake file containing the task + */ file?: string; }