(rootDir: vscode.Uri, depsToInstall: string[])
| 131 | }; |
| 132 | |
| 133 | export const installDevDependencies = async (rootDir: vscode.Uri, depsToInstall: string[]) => { |
| 134 | const pkg = getPackageJson(rootDir); |
| 135 | const packageManager = await getPackageManager(rootDir); |
| 136 | if (!pkg) { |
| 137 | return; |
| 138 | } |
| 139 | return runCommand({ |
| 140 | rootDir, |
| 141 | title: "Installing dependencies", |
| 142 | command: `${packageManager} ${packageManager !== "npm" ? "add" : "install"} -D ${depsToInstall.join(" ")}`, |
| 143 | }); |
| 144 | }; |
| 145 | |
| 146 | interface RunCommandOptions { |
| 147 | rootDir: vscode.Uri; |
no test coverage detected