Skip to content

Commit

Permalink
chore: revise code for readability (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
FajarKim authored Nov 26, 2023
1 parent 948ad25 commit 35da058
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions scripts/generate-theme-doc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function generateThemeLink(username: string, theme: string): string {
* @param {string} username GitHub username.
* @returns {string} README content string.
*/
function generateReadme(username: string): string {
export function generateReadmeThemes(username: string): string {
const availableThemes = Object.keys(themes);
const itemsPerRow = 3;

Expand Down Expand Up @@ -82,7 +82,7 @@ ${themesPreviewLink}`;
const username = "FajarKim";

// Generate the README content
const generatedReadme = generateReadme(username);
const generatedReadme = generateReadmeThemes(username);

// Write the README content to the specified file
fs.writeFileSync(TARGET_FILE, generatedReadme);
4 changes: 2 additions & 2 deletions scripts/generate-translation-doc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function generateTranslationsMarkdown(locale: string): string {
*
* @returns {string} README content string.
*/
function generateReadme(): string {
export function generateReadmeLocales(): string {
const availableLocales = Object.keys(locales);

// Generate table rows with locale details
Expand Down Expand Up @@ -62,7 +62,7 @@ Want to add new translations? Consider reading the [contribution guidelines](htt
}

// Generate the README content
const generatedReadme = generateReadme();
const generatedReadme = generateReadmeLocales();

// Write the README content to the specified file
fs.writeFileSync(TARGET_FILE, generatedReadme);

0 comments on commit 35da058

Please sign in to comment.