Skip to content

Commit

Permalink
misc(init-generator): small refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
misterdev committed May 29, 2019
1 parent fb25bd2 commit dcf44c1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/webpack-scaffold/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,13 @@ export function InputValidate(
cb?: (input: string) => string | boolean,
defaultChoice?: string,
): Generator.Question {

const input: Generator.Question = {
message,
name,
type: "input",
validate: cb
};
if (defaultChoice !== undefined) input.default = defaultChoice;
if (defaultChoice) input.default = defaultChoice;
return input;
}

Expand Down

0 comments on commit dcf44c1

Please sign in to comment.