Skip to content

Commit ac35a31

Browse files
committedMay 28, 2019
misc(generators): improve prompts
1 parent 4627ea1 commit ac35a31

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed
 

‎packages/generators/utils/entry.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default function entry(self: CustomGenerator, multiEntries: boolean): Pro
2424
.prompt([
2525
InputValidate(
2626
"multipleEntries",
27-
"Type the names you want for your modules (entry files) separated by comma",
27+
"How do you want to name your bundles? (separated by comma)",
2828
validate,
2929
"pageOne, pageTwo",
3030
),
@@ -102,7 +102,7 @@ export default function entry(self: CustomGenerator, multiEntries: boolean): Pro
102102
self.prompt([
103103
InputValidate(
104104
`${entryProp}`,
105-
`What is the location of "${entryProp}"?`,
105+
`Which will be the entry point of "${entryProp}"?`,
106106
validate,
107107
`src/${entryProp}`,
108108
),

‎packages/utils/run-prettier.ts

+5-7
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,17 @@ export default function runPrettier(outputPath: string, source: string, cb?: Fun
1919
try {
2020
prettySource = prettier.format(source, {
2121
filepath: outputPath,
22-
parser: "babylon",
22+
parser: "babel",
2323
singleQuote: true,
2424
tabWidth: 1,
2525
useTabs: true,
2626
});
2727
} catch (err) {
2828
process.stdout.write(
29-
"\n" +
30-
chalk.yellow(
31-
`WARNING: Could not apply prettier to ${outputPath}` +
32-
" due validation error, but the file has been created\n" +
33-
err,
34-
),
29+
`\n${chalk.yellow(
30+
`WARNING: Could not apply prettier to ${outputPath}` +
31+
" due validation error, but the file has been created\n",
32+
)}`,
3533
);
3634
prettySource = source;
3735
error = err;

0 commit comments

Comments
 (0)
Please sign in to comment.