diff --git a/src/generators/ClangGenerator.ts b/src/generators/ClangGenerator.ts index 5d0e3fc..40b29b8 100644 --- a/src/generators/ClangGenerator.ts +++ b/src/generators/ClangGenerator.ts @@ -10,11 +10,12 @@ import { } from "../@types/index.js"; import AppGenerator from "../app.js"; import { - ProjectName, - ProjectId, - ProjectDescription, + Author, Git, PackageManager, + ProjectDescription, + ProjectId, + ProjectName, } from "../questions/index.js"; import { ConfigHelper } from "../helpers/index.js"; import { NodeEnvironment } from "../environments/index.js"; @@ -39,6 +40,7 @@ export class ClangGenerator implements GeneratorInterface { new ProjectName(this.generator).getQuestion(), new ProjectId(this.generator).getQuestion(), new ProjectDescription(this.generator).getQuestion(), + new Author(this.generator).getQuestion(), new Git(this.generator).getQuestion(), new PackageManager(this.generator).getQuestion(), ); @@ -81,6 +83,9 @@ export class ClangGenerator implements GeneratorInterface { this.generator.options.id = this.generator.options.id || answers.id; this.generator.options.pkg = this.generator.options.pkg || answers.pkg; + this.generator.options.author = + this.generator.options.author || answers.author; + // @ts-expect-error This is necessary as the env 'options' property doesn't seem to be correctly typed on the Environment. // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access this.generator.env.options.nodePackageManager = diff --git a/src/generators/CrestronSimplGenerator.ts b/src/generators/CrestronSimplGenerator.ts index 45fb3ea..617749b 100644 --- a/src/generators/CrestronSimplGenerator.ts +++ b/src/generators/CrestronSimplGenerator.ts @@ -11,11 +11,12 @@ import { } from "../@types/index.js"; import AppGenerator from "../app.js"; import { - ProjectName, - ProjectId, - ProjectDescription, + Author, Git, PackageManager, + ProjectDescription, + ProjectId, + ProjectName, } from "../questions/index.js"; import { ConfigHelper } from "../helpers/index.js"; import { NodeEnvironment } from "../environments/index.js"; @@ -40,6 +41,7 @@ export class CrestronSimplGenerator implements GeneratorInterface { new ProjectName(this.generator).getQuestion(), new ProjectId(this.generator).getQuestion(), new ProjectDescription(this.generator).getQuestion(), + new Author(this.generator).getQuestion(), new Git(this.generator).getQuestion(), new PackageManager(this.generator).getQuestion(), ); @@ -82,6 +84,9 @@ export class CrestronSimplGenerator implements GeneratorInterface { this.generator.options.id = this.generator.options.id || answers.id; this.generator.options.pkg = this.generator.options.pkg || answers.pkg; + this.generator.options.author = + this.generator.options.author || answers.author; + // @ts-expect-error This is necessary as the env 'options' property doesn't seem to be correctly typed on the Environment. // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access this.generator.env.options.nodePackageManager = diff --git a/src/generators/HtmlGenerator.ts b/src/generators/HtmlGenerator.ts index 2aed6ed..fc7cd51 100644 --- a/src/generators/HtmlGenerator.ts +++ b/src/generators/HtmlGenerator.ts @@ -10,11 +10,12 @@ import { } from "../@types/index.js"; import AppGenerator from "../app.js"; import { - ProjectName, - ProjectId, - ProjectDescription, + Author, Git, PackageManager, + ProjectDescription, + ProjectId, + ProjectName, } from "../questions/index.js"; import { ConfigHelper } from "../helpers/index.js"; import { NodeEnvironment } from "../environments/index.js"; @@ -39,6 +40,7 @@ export class HtmlGenerator implements GeneratorInterface { new ProjectName(this.generator).getQuestion(), new ProjectId(this.generator).getQuestion(), new ProjectDescription(this.generator).getQuestion(), + new Author(this.generator).getQuestion(), new Git(this.generator).getQuestion(), new PackageManager(this.generator).getQuestion(), ); @@ -81,6 +83,9 @@ export class HtmlGenerator implements GeneratorInterface { this.generator.options.id = this.generator.options.id || answers.id; this.generator.options.pkg = this.generator.options.pkg || answers.pkg; + this.generator.options.author = + this.generator.options.author || answers.author; + // @ts-expect-error This is necessary as the env 'options' property doesn't seem to be correctly typed on the Environment. // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access this.generator.env.options.nodePackageManager = diff --git a/src/generators/JavascriptGenerator.ts b/src/generators/JavascriptGenerator.ts index f867e25..d792c04 100644 --- a/src/generators/JavascriptGenerator.ts +++ b/src/generators/JavascriptGenerator.ts @@ -10,11 +10,12 @@ import { } from "../@types/index.js"; import AppGenerator from "../app.js"; import { - ProjectName, - ProjectId, - ProjectDescription, + Author, Git, PackageManager, + ProjectDescription, + ProjectId, + ProjectName, } from "../questions/index.js"; import { ConfigHelper } from "../helpers/index.js"; import { NodeEnvironment } from "../environments/index.js"; @@ -39,6 +40,7 @@ export class JavascriptGenerator implements GeneratorInterface { new ProjectName(this.generator).getQuestion(), new ProjectId(this.generator).getQuestion(), new ProjectDescription(this.generator).getQuestion(), + new Author(this.generator).getQuestion(), new Git(this.generator).getQuestion(), new PackageManager(this.generator).getQuestion(), ); @@ -81,6 +83,9 @@ export class JavascriptGenerator implements GeneratorInterface { this.generator.options.id = this.generator.options.id || answers.id; this.generator.options.pkg = this.generator.options.pkg || answers.pkg; + this.generator.options.author = + this.generator.options.author || answers.author; + // @ts-expect-error This is necessary as the env 'options' property doesn't seem to be correctly typed on the Environment. // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access this.generator.env.options.nodePackageManager = diff --git a/src/generators/NodeCliGenerator.ts b/src/generators/NodeCliGenerator.ts index 2ee9881..4e23fbb 100644 --- a/src/generators/NodeCliGenerator.ts +++ b/src/generators/NodeCliGenerator.ts @@ -10,11 +10,12 @@ import { } from "../@types/index.js"; import AppGenerator from "../app.js"; import { - ProjectName, - ProjectId, - ProjectDescription, + Author, Git, PackageManager, + ProjectDescription, + ProjectId, + ProjectName, } from "../questions/index.js"; import { ConfigHelper } from "../helpers/index.js"; import { NodeEnvironment } from "../environments/index.js"; @@ -39,6 +40,7 @@ export class NodeCliGenerator implements GeneratorInterface { new ProjectName(this.generator).getQuestion(), new ProjectId(this.generator).getQuestion(), new ProjectDescription(this.generator).getQuestion(), + new Author(this.generator).getQuestion(), new Git(this.generator).getQuestion(), new PackageManager(this.generator).getQuestion(), ); @@ -81,6 +83,9 @@ export class NodeCliGenerator implements GeneratorInterface { this.generator.options.id = this.generator.options.id || answers.id; this.generator.options.pkg = this.generator.options.pkg || answers.pkg; + this.generator.options.author = + this.generator.options.author || answers.author; + // @ts-expect-error This is necessary as the env 'options' property doesn't seem to be correctly typed on the Environment. // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access this.generator.env.options.nodePackageManager = diff --git a/src/generators/PythonGenerator.ts b/src/generators/PythonGenerator.ts index 7ff0804..8758eea 100644 --- a/src/generators/PythonGenerator.ts +++ b/src/generators/PythonGenerator.ts @@ -10,10 +10,11 @@ import { } from "../@types/index.js"; import AppGenerator from "../app.js"; import { - ProjectName, - ProjectId, - ProjectDescription, + Author, Git, + ProjectDescription, + ProjectId, + ProjectName, } from "../questions/index.js"; import { ConfigHelper } from "../helpers/index.js"; @@ -36,6 +37,7 @@ export class PythonGenerator implements GeneratorInterface { new ProjectName(this.generator).getQuestion(), new ProjectId(this.generator).getQuestion(), new ProjectDescription(this.generator).getQuestion(), + new Author(this.generator).getQuestion(), new Git(this.generator).getQuestion(), ); } @@ -76,6 +78,9 @@ export class PythonGenerator implements GeneratorInterface { this.generator.options.id = this.generator.options.id || answers.id; + this.generator.options.author = + this.generator.options.author || answers.author; + this.generator.options.description = this.generator.options.skipPrompts ? this.generator.options.description : answers.description; diff --git a/src/generators/TypescriptGenerator.ts b/src/generators/TypescriptGenerator.ts index 36747f1..1afb74a 100644 --- a/src/generators/TypescriptGenerator.ts +++ b/src/generators/TypescriptGenerator.ts @@ -82,6 +82,7 @@ export class TypescriptGenerator implements GeneratorInterface { this.generator.options.id = this.generator.options.id || answers.id; this.generator.options.pkg = this.generator.options.pkg || answers.pkg; + this.generator.options.author = this.generator.options.author || answers.author;