Skip to content

Commit ecdb15f

Browse files
author
Nabeel Shakeel
authored
Merge pull request #9 from Techwards/fix/8-fixed-in-output-prompts
Fix | Task#8 | Fixed Output Prompts
2 parents c941e07 + e513870 commit ecdb15f

File tree

3 files changed

+38
-24
lines changed

3 files changed

+38
-24
lines changed

README.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,16 @@
22
<!-- <p align="center">
33
<img src="" alt="Repo Checklist" width="500" />
44
</p> -->
5-
6-
<h1 align="center">Repo Checklist</h1>
5+
<a href="https://www.npmjs.com/package/repo-checklist">
6+
<h1 align="center">Repo Checklist</h1>
7+
</a>
78

89
<!-- PROJECT SHIELDS -->
910
<p align="center">
10-
<a href="package_link_here">
11-
<img src="https://img.shields.io/badge/node-18.x.x-brightgreen.svg" alt="version" />
12-
</a>
11+
<img src="https://img.shields.io/badge/node-18.x.x-brightgreen.svg" alt="version" />
1312
&nbsp;
14-
<a href="package_link_here">
15-
<img src="https://github.com/Techwards/tw-website/actions/workflows/frontend.yml/badge.svg" alt="build" />
16-
</a>
17-
&nbsp;
18-
<a href="package_link_here">
19-
<img src="https://img.shields.io/npm/dm/prompts.svg" alt="downloads" />
13+
<a href="https://www.npmjs.com/package/repo-checklist">
14+
<img src="https://img.shields.io/npm/dm/repo-checklist" alt="downloads" />
2015
</a>
2116
</p>
2217

@@ -50,6 +45,17 @@ Generated files on the following paths
5045

5146
![split](https://github.com/terkelg/prompts/raw/master/media/split.png)
5247

48+
## Future Roadmap
49+
50+
Following are the future items that we will add
51+
52+
- Issue Template Webform Support
53+
- Code Owners Support
54+
55+
Any contributions are welcome!
56+
57+
![split](https://github.com/terkelg/prompts/raw/master/media/split.png)
58+
5359
## Contributing
5460

5561
[Guidelines](https://github.com/RepoHealth/repo-checklist/blob/main/CONTRIBUTING.md) outlines the guidelines for contributing to this project.

src/index.ts

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -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

105113
init().catch((e) => {

yarn.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ esbuild-android-arm64@0.15.18:
490490

491491
esbuild-darwin-64@0.15.18:
492492
version "0.15.18"
493-
resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.15.18.tgz#428e1730ea819d500808f220fbc5207aea6d4410"
493+
resolved "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.18.tgz"
494494
integrity sha512-2WAvs95uPnVJPuYKP0Eqx+Dl/jaYseZEUUT1sjg97TJa4oBtbAKnPnl3b5M9l51/nbx7+QAEtuummJZW0sBEmg==
495495

496496
esbuild-darwin-arm64@0.15.18:
@@ -515,7 +515,7 @@ esbuild-linux-32@0.15.18:
515515

516516
esbuild-linux-64@0.15.18:
517517
version "0.15.18"
518-
resolved "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.15.18.tgz"
518+
resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.15.18.tgz#532738075397b994467b514e524aeb520c191b6c"
519519
integrity sha512-hNSeP97IviD7oxLKFuii5sDPJ+QHeiFTFLoLm7NZQligur8poNOWGIgpQ7Qf8Balb69hptMZzyOBIPtY09GZYw==
520520

521521
esbuild-linux-arm64@0.15.18:
@@ -662,7 +662,7 @@ fs.realpath@^1.0.0:
662662

663663
fsevents@~2.3.2:
664664
version "2.3.2"
665-
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a"
665+
resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz"
666666
integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==
667667

668668
function-bind@^1.1.1:

0 commit comments

Comments
 (0)