Skip to content
This repository was archived by the owner on Mar 30, 2021. It is now read-only.

Commit 848d673

Browse files
committed
Improved some messages
1 parent 2bc7ff6 commit 848d673

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

generators/app/index.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ module.exports = class extends Generator {
5858
message:
5959
"I need the build file (generally index.js, main.js or componentName.js) for this, import it using one of the options -",
6060
choices: [
61-
"Install component from npm package (Recommended - fastest way)",
61+
"Install component from npm package. (Recommended - fastest way)",
6262
"Tell us the path of the build file on your local machine and I will import it in the project.",
6363
"Tell us the npm package name, version, build file URL and I will download the build file."
6464
],
@@ -83,7 +83,7 @@ module.exports = class extends Generator {
8383
name: "changeImportSourceFromNpmPackage",
8484
message: "What do you want to do?",
8585
choices: [
86-
"Enter package name again to install component from npm package.",
86+
"Enter package name again to install component from npm package. (Recommended - fastest way)",
8787
"Import the file locally from your computer.",
8888
"Enter package name, version, build file URL to download the build file."
8989
],
@@ -130,7 +130,7 @@ module.exports = class extends Generator {
130130
name: "changeImportSourceFromNpmBuildFile",
131131
message: "What do you want to do?",
132132
choices: [
133-
"Enter package name again to install component from npm package.",
133+
"Enter package name again to install component from npm package. (Recommended - fastest way)",
134134
"Import the file locally from your computer.",
135135
"Enter package name, version, build file URL to download the build file."
136136
],
@@ -203,9 +203,7 @@ module.exports = class extends Generator {
203203
{
204204
type: "input",
205205
name: "directoryName",
206-
message: `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 ${chalk.cyan(
207-
"component-dist"
208-
)}.`,
206+
message: "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.",
209207
validate: validators.directoryName,
210208
default: "component-dist"
211209
},

generators/app/validator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ validators.checkVersionAndInstallComponent = async function(props, answers) {
140140

141141
validators.directoryName = async props => {
142142
var res;
143-
if (props.trim() === "o") {
143+
if (props.trim() === "o" || props.trim() === "O") {
144144
res = await executeCommand(`rm -rf ${projectDirectory}/${buildDirectory}/*`)
145145
.then(() => true)
146146
.catch(err => {

0 commit comments

Comments
 (0)