mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +00:00
allow excluding npm install
script from the npm scripts view (#151647)
fix #149924
This commit is contained in:
parent
160855dfb7
commit
4222eb73aa
|
@ -287,8 +287,9 @@ async function provideNpmScriptsForFolder(context: ExtensionContext, packageJson
|
||||||
result.push({ task, location: new Location(packageJsonUri, nameRange) });
|
result.push({ task, location: new Location(packageJsonUri, nameRange) });
|
||||||
}
|
}
|
||||||
|
|
||||||
// always add npm install (without a problem matcher)
|
if (!workspace.getConfiguration('npm', folder).get<string[]>('scriptExplorerExclude', []).find(e => e.includes('install'))) {
|
||||||
result.push({ task: await createTask(packageManager, INSTALL_SCRIPT, [INSTALL_SCRIPT], folder, packageJsonUri, 'install dependencies from package', []) });
|
result.push({ task: await createTask(packageManager, INSTALL_SCRIPT, [INSTALL_SCRIPT], folder, packageJsonUri, 'install dependencies from package', []) });
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue