diff --git a/extensions/npm/resources/dark/prepostscript.svg b/extensions/npm/resources/dark/prepostscript.svg new file mode 100644 index 00000000000..cc9bcee715a --- /dev/null +++ b/extensions/npm/resources/dark/prepostscript.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/extensions/npm/resources/light/prepostscript.svg b/extensions/npm/resources/light/prepostscript.svg new file mode 100644 index 00000000000..e59d80cd323 --- /dev/null +++ b/extensions/npm/resources/light/prepostscript.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/extensions/npm/src/npmView.ts b/extensions/npm/src/npmView.ts index 2a7dd172c69..509aaa7ce17 100644 --- a/extensions/npm/src/npmView.ts +++ b/extensions/npm/src/npmView.ts @@ -8,7 +8,7 @@ import * as path from 'path'; import { DebugConfiguration, Event, EventEmitter, ExtensionContext, Task, TextDocument, ThemeIcon, TreeDataProvider, TreeItem, TreeItemCollapsibleState, Uri, - WorkspaceFolder, commands, debug, window, workspace, Selection + WorkspaceFolder, commands, debug, window, workspace, Selection, TaskGroup } from 'vscode'; import { visit, JSONVisitor } from 'jsonc-parser'; import { NpmTaskDefinition, getPackageJsonUriFromTask, getScripts, isWorkspaceFolder, getPackageManager, getTaskName } from './tasks'; @@ -79,10 +79,17 @@ class NpmScript extends TreeItem { command: 'npm.openScript', arguments: [this] }; - this.iconPath = { - light: context.asAbsolutePath(path.join('resources', 'light', 'script.svg')), - dark: context.asAbsolutePath(path.join('resources', 'dark', 'script.svg')) - }; + if (task.group && task.group === TaskGroup.Clean) { + this.iconPath = { + light: context.asAbsolutePath(path.join('resources', 'light', 'prepostscript.svg')), + dark: context.asAbsolutePath(path.join('resources', 'dark', 'prepostscript.svg')) + }; + } else { + this.iconPath = { + light: context.asAbsolutePath(path.join('resources', 'light', 'script.svg')), + dark: context.asAbsolutePath(path.join('resources', 'dark', 'script.svg')) + }; + } } getFolder(): WorkspaceFolder {