Skip to content

Commit

Permalink
feat(configurations): add Post-script to configurations list
Browse files Browse the repository at this point in the history
  • Loading branch information
hckhanh committed Mar 18, 2021
1 parent ae2e694 commit 66b8081
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class CreateJavascriptProject extends Command {
this.parse(CreateJavascriptProject);
await checkPackageJson();
const answers = await collectAnswers();
answers.configurations.push("post");

if (answers.configurations.includes("flow") || answers.framework !== "none") {
answers.module = "esm";
Expand Down
3 changes: 2 additions & 1 deletion src/inquirer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ export async function collectAnswers(): Promise<InquirerConfigs> {
{ name: "Prettier", value: "prettier" },
{ name: "Flow", value: "flow" },
{ name: "Yarn 2 (Berry)", value: "yarn2" },
{ name: "Post-script", value: "post" },
],
default: ["yarn2", "eslint", "prettier"],
default: ["eslint", "prettier", "yarn2", "post"],
validate: (input: GeneratorType[]) => {
return input.length === 0 ? "At least one configuration need to be selected" : true;
},
Expand Down

0 comments on commit 66b8081

Please sign in to comment.