Skip to content

Commit 404ae9e

Browse files
committed
Update comment structure πŸ—
1 parent 10c38b1 commit 404ae9e

File tree

6 files changed

+11
-85
lines changed

6 files changed

+11
-85
lines changed

β€Ž.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22
node_modules
33

44
# eslint cache
5-
.eslintcache
5+
.eslintcache
6+
7+
# tsc
8+
lib

β€Ždist/book.js

-48
This file was deleted.

β€Ždist/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -9480,12 +9480,12 @@ function writeReadme(path, content) {
94809480
fs.writeFileSync(path, content);
94819481
}
94829482
function commentToMarkdown(comment) {
9483-
return `[@${comment.user}](https://github.com/${comment.user}) said:
9484-
> ${comment.text}
9483+
return `> ${comment.text}\n
9484+
> -[@${comment.user}](https://github.com/${comment.user})
94859485
<sup>[src](${comment.url})</sup>`;
94869486
}
94879487
function createGuestbookList(comments) {
9488-
return comments.map(commentToMarkdown).join("\n\n---\n\n");
9488+
return comments.map(commentToMarkdown).join("\n\n");
94899489
}
94909490
function generateGuestbook(path, comments) {
94919491
const guestbook = getReadme(path);

β€Ždist/utils.js

-29
This file was deleted.

β€Žsrc/book.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ function writeReadme(path: string, content: string): void {
1515
}
1616

1717
function commentToMarkdown(comment: Comment): string {
18-
return `[@${comment.user}](https://github.com/${comment.user}) said:
19-
> ${comment.text}
18+
return `> ${comment.text}\n
19+
> -[@${comment.user}](https://github.com/${comment.user})
2020
<sup>[src](${comment.url})</sup>`;
2121
}
2222

2323
function createGuestbookList(comments: Comment[]): string {
24-
return comments.map(commentToMarkdown).join("\n\n---\n\n");
24+
return comments.map(commentToMarkdown).join("\n\n");
2525
}
2626

2727
export function generateGuestbook(path: string, comments: Comment[]): void {

β€Žtsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/* Basic Options */
44
"target": "ES2020", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
55
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
6-
"outDir": "./dist", /* Redirect output structure to the directory. */
6+
"outDir": "./lib", /* Redirect output structure to the directory. */
77
"rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
88

99
/* Strict Type-Checking Options */

0 commit comments

Comments
 (0)