1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-09-02 22:02:39 +02:00

Add mongodb content

This commit is contained in:
Kamran Ahmed
2023-03-28 14:05:57 +01:00
parent af211ab129
commit e0f9bc8456
100 changed files with 4732 additions and 100 deletions

View File

@@ -111,8 +111,13 @@ async function run() {
const currTopicUrl = topicId.replace(/^\d+-/g, '/').replace(/:/g, '/');
const contentFilePath = topicUrlToPathMapping[currTopicUrl];
if (!contentFilePath) {
console.log(`Missing file for: ${currTopicUrl}`);
return;
}
const currentFileContent = fs.readFileSync(contentFilePath, 'utf8');
const isFileEmpty = currentFileContent.replace(/^#.+/, ``).trim() == '';
const isFileEmpty = currentFileContent.replace(/^#.+/, ``).trim() === '';
if (!isFileEmpty) {
console.log(`Ignoring ${topicId}. Not empty.`);