complete-cli 1.0.1-dev.8 → 1.0.1-dev.9
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.
|
@@ -113,11 +113,17 @@ async function installNodeModules(projectPath, skipInstall, packageManager) {
|
|
|
113
113
|
return;
|
|
114
114
|
}
|
|
115
115
|
const command = getPackageManagerInstallCommand(packageManager);
|
|
116
|
-
const s = promptSpinnerStart(`Installing
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
116
|
+
const s = promptSpinnerStart(`Installing the project dependencies with "${command}". (This can take a long time.)`);
|
|
117
|
+
try {
|
|
118
|
+
const $$ = $({ cwd: projectPath });
|
|
119
|
+
const commandParts = command.split(" ");
|
|
120
|
+
await $$ `${commandParts}`;
|
|
121
|
+
s.stop("Installed.");
|
|
122
|
+
}
|
|
123
|
+
catch {
|
|
124
|
+
s.stop("Failed to install.");
|
|
125
|
+
promptError("Exiting.");
|
|
126
|
+
}
|
|
121
127
|
}
|
|
122
128
|
async function formatFiles(projectPath) {
|
|
123
129
|
const $$ = $({ cwd: projectPath });
|
package/dist/prompt.js
CHANGED
package/package.json
CHANGED
|
@@ -184,12 +184,18 @@ async function installNodeModules(
|
|
|
184
184
|
|
|
185
185
|
const command = getPackageManagerInstallCommand(packageManager);
|
|
186
186
|
const s = promptSpinnerStart(
|
|
187
|
-
`Installing
|
|
187
|
+
`Installing the project dependencies with "${command}". (This can take a long time.)`,
|
|
188
188
|
);
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
189
|
+
|
|
190
|
+
try {
|
|
191
|
+
const $$ = $({ cwd: projectPath });
|
|
192
|
+
const commandParts = command.split(" ");
|
|
193
|
+
await $$`${commandParts}`;
|
|
194
|
+
s.stop("Installed.");
|
|
195
|
+
} catch {
|
|
196
|
+
s.stop("Failed to install.");
|
|
197
|
+
promptError("Exiting.");
|
|
198
|
+
}
|
|
193
199
|
}
|
|
194
200
|
|
|
195
201
|
async function formatFiles(projectPath: string) {
|
package/src/prompt.ts
CHANGED