You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 30, 2021. It is now read-only.
- The generator will run in directory mentioned in argument,
whether the directory exists or not.
- Changed tests accordingly
- Removed bug which showed the "directoryName" question even when
user wished to switch the source of importing file
Copy file name to clipboardExpand all lines: generators/app/index.js
+11-16Lines changed: 11 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -163,6 +163,13 @@ module.exports = class extends Generator {
163
163
message:
164
164
"The build file will be imported in a separate directory in the project's root. Enter the name of this directory or press Enter if you like to go with default.",
165
165
validate: validators.directoryName,
166
+
when: function(responses){
167
+
if(responses.confirmPackageName){
168
+
returntrue;// Show this prompt if user says that package description is correct
169
+
}
170
+
171
+
returnfalse;// Don't show this prompt if user says that package description is incorrect
172
+
},
166
173
default: "component-dist"
167
174
},
168
175
{
@@ -251,7 +258,6 @@ module.exports = class extends Generator {
251
258
);// Call the function recursively
252
259
}
253
260
254
-
// If user chooses to install component from npm after starting over
`Oops! We encountered an error. Please see below for the more details - \n${chalk.yellow(
21
-
err
22
-
)}\nIf the directory whose path you entered already exists and you want that to be your project directory, cd into that directory and run ${chalk.cyan("`yo @biojs/biojs-webcomponents .`")}.`
23
-
);
18
+
.catch(async()=>{
19
+
vartryAgain=awaitexecuteCommand(
20
+
"ls "+projectDirectory,
21
+
"checkDirExistence"
22
+
)
23
+
.then(()=>true)
24
+
.catch(err=>{
25
+
returnchalk.red(
26
+
`Oops! We encountered an error. Please see below for the more details - \n${chalk.yellow(
27
+
err
28
+
)}\n.Try this - cd into that directory and run ${chalk.cyan(
0 commit comments