@@ -51,43 +51,41 @@ async function init() {
5151 }
5252
5353 const root = path . join ( cwd ) ;
54- console . log ( blue ( `\nScaffolding templates in ${ root } ...` ) ) ;
54+ console . log ( blue ( `\nScaffolding templates in ${ root } ...\n ` ) ) ;
5555
5656 if ( prTemplate || issueTemplate ) {
5757 if ( ! fs . existsSync ( dotGithubDir ) ) {
58- console . log ( magenta ( '.github dir does not exist, making .github dir' ) ) ;
5958 mkDir ( dotGithubDir ) ;
60- console . log ( magenta ( '.github dir created ' ) ) ;
59+ console . log ( magenta ( '✔ Created .github directory ' ) ) ;
6160 }
6261 }
63-
62+ let prTemplatePath ;
6463 if ( prTemplate ) {
6564 const sourcePRTemplateDir = getTemplateDirPath ( 'pr' ) ;
6665 const files = fs . readdirSync ( sourcePRTemplateDir ) ;
6766 for ( const file of files ) {
6867 const sourceFilePath = path . join ( sourcePRTemplateDir , file ) ;
6968 const destFilePath = path . join ( dotGithubDir , file ) ;
69+ prTemplatePath = destFilePath ;
7070 copy ( sourceFilePath , destFilePath ) ;
7171 }
7272 }
73-
73+ let contribTemplatePath ;
7474 if ( contribTemplate ) {
7575 const templateDir = getTemplateDirPath ( 'contrib' ) ;
7676 const files = fs . readdirSync ( templateDir ) ;
7777 for ( const file of files ) {
7878 const sourceFilePath = path . join ( templateDir , file ) ;
7979 const targetFilePath = path . join ( cwd , file ) ;
80+ contribTemplatePath = targetFilePath ;
8081 copy ( sourceFilePath , targetFilePath ) ;
8182 }
8283 }
8384
8485 if ( issueTemplate ) {
8586 if ( ! fs . existsSync ( issueTemplateDir ) ) {
86- console . log (
87- magenta ( 'issueTemplate dir does not exist, making issueTemplate dir' ) ,
88- ) ;
8987 mkDir ( issueTemplateDir ) ;
90- console . log ( magenta ( 'issueTemplate dir created ' ) ) ;
88+ console . log ( magenta ( '✔ Created ISSUE_TEMPLATE directory ' ) ) ;
9189 }
9290
9391 const sourceIssueTemplateDir = getTemplateDirPath ( 'issue' ) ;
@@ -99,7 +97,17 @@ async function init() {
9997 }
10098 }
10199
102- console . log ( blue ( `\nSuccessfully created the templates. Exiting...` ) ) ;
100+ let closingMessage = `\nSuccessfully created the templates on the following paths.\n` ;
101+
102+ const prTemplateMessage = `✔ Created Pr Template at ${ prTemplatePath } \n` ;
103+ const contribTemplateMessage = `✔ Created Contribution Template at ${ contribTemplatePath } \n` ;
104+ const issueTemplateMessage = `✔ Created Issue Template at ${ issueTemplateDir } \n` ;
105+
106+ closingMessage += prTemplate ? prTemplateMessage : '' ;
107+ closingMessage += contribTemplate ? contribTemplateMessage : '' ;
108+ closingMessage += issueTemplate ? issueTemplateMessage : '' ;
109+
110+ console . log ( blue ( closingMessage ) ) ;
103111}
104112
105113init ( ) . catch ( ( e ) => {
0 commit comments