mirror of
https://github.com/thelounge/thelounge.git
synced 2026-03-14 14:35:50 +01:00
Minor fixes in the config
This commit is contained in:
parent
927fa92518
commit
e321c7eb99
2 changed files with 24 additions and 15 deletions
|
|
@ -43,14 +43,19 @@ const extractedDoc = configContent
|
|||
return acc;
|
||||
}, []).join("\n");
|
||||
|
||||
const infoBlock = `<!--
|
||||
const infoBlockHeader = `<!--
|
||||
DO NOT EDIT THIS FILE MANUALLY.
|
||||
Content for the following is generated by this script in the main repo:
|
||||
https://github.com/thelounge/thelounge/blob/master/scripts/generate-config-doc.js
|
||||
Last updated at ${Date()} by ${getGitUsername()}
|
||||
https://github.com/thelounge/thelounge/blob/master/scripts/generate-config-doc.js`;
|
||||
|
||||
const infoBlockTop = `${infoBlockHeader}
|
||||
Last updated at ${getPrettyDate()} (UTC) by ${getGitUsername()}
|
||||
-->`;
|
||||
|
||||
const generatedContent = `${infoBlock}\n\n${extractedDoc}\n${infoBlock}\n`;
|
||||
const infoBlockBottom = `${infoBlockHeader}
|
||||
-->`;
|
||||
|
||||
const generatedContent = `${infoBlockTop}\n\n${extractedDoc}\n${infoBlockBottom}\n`;
|
||||
|
||||
writeFileSync(docPath, generatedContent);
|
||||
|
||||
|
|
@ -59,3 +64,7 @@ log.info(
|
|||
`(${colors.bold(generatedContent.length)} characters) ` +
|
||||
`were written in ${colors.green(docPath)}.`
|
||||
);
|
||||
|
||||
function getPrettyDate() {
|
||||
return (new Date()).toISOString().split(".")[0].replace("T", " ");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue