Skip to content

Commit

Permalink
exclude folders
Browse files Browse the repository at this point in the history
  • Loading branch information
ntotten committed Jan 10, 2024
1 parent a17dddf commit 408ed58
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions src/build/navigation.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@ function buildNavSection(rawSection) {
for (const item of rawSection.items) {
if (typeof item === "string") {
if (item.startsWith("policies/")) {
let schemaPath = path.resolve(
path.join(item.replace("policies/", "temp/"), `schema.json`),
);
let schemaPath = path.resolve(path.join(item, `schema.json`));
if (!fs.existsSync(schemaPath)) {
schemaPath = path.resolve(
path.join(item.replace("policies/", "temp/"), `schema.json`),
);
}
if (!fs.existsSync(schemaPath)) {
throw new Error(`Schema file not found: ${schemaPath}`);
}
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@
".next/types/**/*.ts",
"sidebar.json"
],
"exclude": ["node_modules", "policies"]
"exclude": ["node_modules", "policies", "scripts", "temp"]
}

0 comments on commit 408ed58

Please sign in to comment.