Skip to content

Commit

Permalink
feat(app): complete Author question class
Browse files Browse the repository at this point in the history
  • Loading branch information
damienbutt committed Feb 23, 2024
1 parent 7e6b52a commit 09062d2
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/questions/Author.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
import { PromptQuestion } from "@yeoman/types";
import { BaseQuestion } from "./index.js";
import { BaseQuestion } from "./BaseQuestion.js";
import { Answers } from "../@types/index.js";
import AppGenerator from "../app.js";

export class Author extends BaseQuestion {
public constructor(generator: AppGenerator) {
super(generator);
// this.generator.options.author = this.generator.git.name();

if (this.generator.options.author) {
return;
}

if (this.generator.options.skipPrompts) {
this.generator.options.author = this.getDefault();
}
}

private getDefault(): string {
return "";
return this.generator.user || "";
}

public getQuestion(): PromptQuestion<Answers> {
Expand Down

0 comments on commit 09062d2

Please sign in to comment.