Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: addon generator to async/await #849

Merged
merged 4 commits into from Apr 23, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
41 changes: 11 additions & 30 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 3 additions & 6 deletions packages/generators/addon-generator.ts
Expand Up @@ -39,12 +39,9 @@ export default function addonGenerator(
public copy: (value: string, index: number, array: string[]) => void;
public copyTpl: (value: string, index: number, array: string[]) => void;

public prompting(): Promise<{}> {
return this.prompt(prompts).then(
(props: InquirerScaffoldObject): void => {
this.props = props;
}
);
public async prompting(): void {
anshumanv marked this conversation as resolved.
Show resolved Hide resolved
const scaffoldObject: InquirerScaffoldObject = await this.prompt(prompts);
this.props = scaffoldObject;
}

public default(): void {
Expand Down