Skip to content

Commit

Permalink
chore: revert incorrectly removed code block
Browse files Browse the repository at this point in the history
  • Loading branch information
petertonysmith94 committed Oct 24, 2024
1 parent 1c646b5 commit fe55f9b
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs-hub/vp-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,27 @@ function checkForUnusedFiles(srcFolderPath, subfolders) {
const folderPath = path.join(srcFolderPath, folder);
const subfolderNames = fs.readdirSync(folderPath);
const parentFolder = folderPath.split("/").pop();
subfolderNames.forEach((subFile) => {
const actualPath = `${parentFolder}/${
subFile === "index.md" ? "" : subFile
}`;
assert(
configFile.includes(actualPath),
`${actualPath} missing in the nav config`
);
const fullPath = path.join(srcFolderPath, actualPath);
if (fs.statSync(fullPath).isDirectory()) {
const subFolderFiles = fs.readdirSync(fullPath);
subFolderFiles.forEach((file) => {
if (file !== "index.md") {
assert(
configFile.includes(file.replace(".md", "")),
`${file} missing in the nav config`
);
}
});
}
});
});
}

Expand Down

0 comments on commit fe55f9b

Please # to comment.