未验证 提交 18177c58 编写于 作者: A Alex Ross 提交者: GitHub

Add a tooltip to scripts in NPM script view (#61596)

Fixes #55218
上级 d393578d
...@@ -108,6 +108,13 @@ class NpmScript extends TreeItem { ...@@ -108,6 +108,13 @@ class NpmScript extends TreeItem {
dark: context.asAbsolutePath(path.join('resources', 'dark', 'script.svg')) dark: context.asAbsolutePath(path.join('resources', 'dark', 'script.svg'))
}; };
} }
let uri = getPackageJsonUriFromTask(task);
getScripts(uri!).then(scripts => {
if (scripts && scripts[task.definition['script']]) {
this.tooltip = scripts[task.definition['script']];
}
});
} }
getFolder(): WorkspaceFolder { getFolder(): WorkspaceFolder {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册