1
0
mirror of synced 2025-12-17 04:08:19 +08:00

update ci related

This commit is contained in:
Xing Yahao
2022-02-26 19:31:36 +09:00
parent c22b550c03
commit 0bcb6a3dd7
4 changed files with 4 additions and 179 deletions

View File

@@ -65,9 +65,7 @@ let README_TEMPLATE = `# 程序员做饭指南
async function main() {
try {
let BEFORE = '';
let MAIN = '';
let AFTER = '';
let BEFORE = MAIN = AFTER = '';
const markdownObj = await getAllMarkdown('.');
for (const markdown of markdownObj) {
if (markdown.path.includes('tips/advanced')) {
@@ -91,10 +89,10 @@ async function main() {
for (const category of Object.values(categories)) {
MAIN += categoryTemplate(category.title, category.str);
}
README_TEMPLATE = README_TEMPLATE.replace('{{before}}', BEFORE)
await writeFile('./README.md', README_TEMPLATE.replace('{{before}}', BEFORE)
.replace('{{main}}', MAIN)
.replace('{{after}}', AFTER);
await writeFile('./README.md', README_TEMPLATE);
.replace('{{after}}', AFTER));
} catch (error) {
console.error(error);
}