Skip to content

Commit

Permalink
Revert "chore: reinstate incorrectly removed code block (#45)"
Browse files Browse the repository at this point in the history
This reverts commit a38e179.
  • Loading branch information
petertonysmith94 committed Oct 28, 2024
1 parent a38e179 commit 92851d9
Showing 1 changed file with 1 addition and 22 deletions.
23 changes: 1 addition & 22 deletions docs-hub/vp-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const configPath = path.join(srcFolderPath, "../.vitepress/config.ts");

const configFile = fs.readFileSync(configPath, "utf8");

const subFolderExceptions = ["guide", "api"];
const subFolderExceptions = ["guide"];

function main() {
checkForIndexFile(srcFolderPath);
Expand Down Expand Up @@ -91,27 +91,6 @@ 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 92851d9

Please sign in to comment.