complete-cli 1.0.5-dev.5 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@ import chalk from "chalk";
|
|
|
2
2
|
import { repeat } from "complete-common";
|
|
3
3
|
import type { PackageManager } from "complete-node";
|
|
4
4
|
import {
|
|
5
|
-
|
|
5
|
+
$q,
|
|
6
6
|
copyFileOrDirectory,
|
|
7
7
|
getFileNamesInDirectory,
|
|
8
8
|
getPackageManagerInstallCICommand,
|
|
@@ -188,9 +188,9 @@ async function installNodeModules(
|
|
|
188
188
|
);
|
|
189
189
|
|
|
190
190
|
try {
|
|
191
|
-
const $$ = $({ cwd: projectPath });
|
|
191
|
+
const $$q = $q({ cwd: projectPath });
|
|
192
192
|
const commandParts = command.split(" ");
|
|
193
|
-
await
|
|
193
|
+
await $$q`${commandParts}`;
|
|
194
194
|
s.stop("Installed.");
|
|
195
195
|
} catch {
|
|
196
196
|
s.stop("Failed to install.");
|
|
@@ -199,6 +199,6 @@ async function installNodeModules(
|
|
|
199
199
|
}
|
|
200
200
|
|
|
201
201
|
async function formatFiles(projectPath: string) {
|
|
202
|
-
const $$ = $({ cwd: projectPath });
|
|
203
|
-
await
|
|
202
|
+
const $$q = $q({ cwd: projectPath });
|
|
203
|
+
await $$q`prettier --write ${projectPath}`;
|
|
204
204
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $, commandExists, getJSONC, isFile } from "complete-node";
|
|
1
|
+
import { $, $q, commandExists, getJSONC, isFile } from "complete-node";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { getInputYesNo, promptError, promptLog } from "../../prompt.js";
|
|
4
4
|
|
|
@@ -60,10 +60,12 @@ async function installVSCodeExtensions(
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
const extensions = await getExtensionsFromJSON(projectPath);
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
await Promise.all(
|
|
64
|
+
extensions.map(
|
|
65
|
+
async (extension) =>
|
|
66
|
+
await $q`${vsCodeCommand} --install-extension ${extension}`,
|
|
67
|
+
),
|
|
68
|
+
);
|
|
67
69
|
}
|
|
68
70
|
|
|
69
71
|
async function getExtensionsFromJSON(
|