Skip to content

Commit

Permalink
misc(generators): improve prompts
Browse files Browse the repository at this point in the history
  • Loading branch information
misterdev committed May 28, 2019
1 parent 4627ea1 commit ac35a31
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
4 changes: 2 additions & 2 deletions packages/generators/utils/entry.ts
Expand Up @@ -24,7 +24,7 @@ export default function entry(self: CustomGenerator, multiEntries: boolean): Pro
.prompt([
InputValidate(
"multipleEntries",
"Type the names you want for your modules (entry files) separated by comma",
"How do you want to name your bundles? (separated by comma)",
validate,
"pageOne, pageTwo",
),
Expand Down Expand Up @@ -102,7 +102,7 @@ export default function entry(self: CustomGenerator, multiEntries: boolean): Pro
self.prompt([
InputValidate(
`${entryProp}`,
`What is the location of "${entryProp}"?`,
`Which will be the entry point of "${entryProp}"?`,
validate,
`src/${entryProp}`,
),
Expand Down
12 changes: 5 additions & 7 deletions packages/utils/run-prettier.ts
Expand Up @@ -19,19 +19,17 @@ export default function runPrettier(outputPath: string, source: string, cb?: Fun
try {
prettySource = prettier.format(source, {
filepath: outputPath,
parser: "babylon",
parser: "babel",
singleQuote: true,
tabWidth: 1,
useTabs: true,
});
} catch (err) {
process.stdout.write(
"\n" +
chalk.yellow(
`WARNING: Could not apply prettier to ${outputPath}` +
" due validation error, but the file has been created\n" +
err,
),
`\n${chalk.yellow(
`WARNING: Could not apply prettier to ${outputPath}` +
" due validation error, but the file has been created\n",
)}`,
);
prettySource = source;
error = err;
Expand Down

0 comments on commit ac35a31

Please sign in to comment.