allow excluding npm `install` script from the npm scripts view (#151647)
fix #149924pull/128662/merge
parent
160855dfb7
commit
4222eb73aa
|
@ -287,8 +287,9 @@ async function provideNpmScriptsForFolder(context: ExtensionContext, packageJson
|
|||
result.push({ task, location: new Location(packageJsonUri, nameRange) });
|
||||
}
|
||||
|
||||
// always add npm install (without a problem matcher)
|
||||
result.push({ task: await createTask(packageManager, INSTALL_SCRIPT, [INSTALL_SCRIPT], folder, packageJsonUri, 'install dependencies from package', []) });
|
||||
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', []) });
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue