MCPcopy Index your code
hub / github.com/microsoft/vscode-js-debug / getScriptRunner

Function getScriptRunner

src/ui/getRunScriptCommand.ts:10–20  ·  view source on GitHub ↗
(folder: WorkspaceFolder | undefined)

Source from the content-addressed store, hash-verified

8 * Gets the package manager the user configured in the folder.
9 */
10export const getScriptRunner = async (folder: WorkspaceFolder | undefined) => {
11 try {
12 return await commands.executeCommand('npm.scriptRunner', folder?.uri);
13 } catch {
14 try {
15 return await commands.executeCommand('npm.packageManager', folder?.uri);
16 } catch {
17 return 'npm';
18 }
19 }
20};
21
22/**
23 * Gets a command to run a script

Callers 2

getFromNpmScriptsMethod · 0.90
getRunScriptCommandFunction · 0.85

Calls 1

executeCommandMethod · 0.80

Tested by

no test coverage detected