Skip to content

Commit

Permalink
Update comment structure πŸ—
Browse files Browse the repository at this point in the history
  • Loading branch information
joshmgross committed Jun 26, 2020
1 parent 10c38b1 commit 404ae9e
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 85 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@
node_modules

# eslint cache
.eslintcache
.eslintcache

# tsc
lib
48 changes: 0 additions & 48 deletions dist/book.js

This file was deleted.

6 changes: 3 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9480,12 +9480,12 @@ function writeReadme(path, content) {
fs.writeFileSync(path, content);
}
function commentToMarkdown(comment) {
return `[@${comment.user}](https://github.com/${comment.user}) said:
> ${comment.text}
return `> ${comment.text}\n
> -[@${comment.user}](https://github.com/${comment.user})
<sup>[src](${comment.url})</sup>`;
}
function createGuestbookList(comments) {
return comments.map(commentToMarkdown).join("\n\n---\n\n");
return comments.map(commentToMarkdown).join("\n\n");
}
function generateGuestbook(path, comments) {
const guestbook = getReadme(path);
Expand Down
29 changes: 0 additions & 29 deletions dist/utils.js

This file was deleted.

6 changes: 3 additions & 3 deletions src/book.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ function writeReadme(path: string, content: string): void {
}

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

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

export function generateGuestbook(path: string, comments: Comment[]): void {
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/* Basic Options */
"target": "ES2020", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
"outDir": "./dist", /* Redirect output structure to the directory. */
"outDir": "./lib", /* Redirect output structure to the directory. */
"rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */

/* Strict Type-Checking Options */
Expand Down

0 comments on commit 404ae9e

Please sign in to comment.