@@ -28,6 +28,7 @@ import { cleanupError } from "./util";
2828 */
2929const main = async ( ) : Promise < void > => {
3030 let applicationName ;
31+ let authorName = "YOUR NAME" ;
3132
3233 try {
3334 // * Used to set the directory, application name, and inserted into templates
@@ -79,7 +80,7 @@ const main = async (): Promise<void> => {
7980 // * Interactive walk-thru
8081
8182 // * Language
82- const answers = await inquirer . prompt ( [
83+ const languageAnswer = await inquirer . prompt ( [
8384 {
8485 type : "list" ,
8586 name : "language" ,
@@ -90,10 +91,21 @@ const main = async (): Promise<void> => {
9091 ] ,
9192 } ,
9293 ] ) ;
93- const languageChoice : "js" | "ts" = answers . language ;
94+ const languageChoice : "js" | "ts" = languageAnswer . language ;
9495 language = languageChoice ;
9596
96- // TODO - Author Name
97+ // * Author Name
98+ const nameAnswer = await inquirer . prompt ( [
99+ {
100+ type : "input" ,
101+ name : "name" ,
102+ message :
103+ "Please input your name (used for the 'About' screen, but not required):" ,
104+ } ,
105+ ] ) ;
106+ const name : string = nameAnswer . name ;
107+ authorName = name ;
108+
97109 // TODO - Compiler Choice (Babel vs. other)
98110 // TODO - Add Prettier
99111 // TODO - Add ESLint / Other Linter
@@ -113,7 +125,7 @@ const main = async (): Promise<void> => {
113125 await installDevDependencies ( applicationName , language ) ;
114126
115127 // * Copies template files and inserts `applicationName` into the files
116- await copyTemplateFiles ( applicationName , language ) ;
128+ await copyTemplateFiles ( applicationName , language , authorName ) ;
117129
118130 // * Creates a tsconfig.json file
119131 if ( language === "ts" ) await createTSConfig ( applicationName ) ;
0 commit comments