mirror of
https://github.com/tauri-apps/tauri-search.git
synced 2026-02-04 02:41:20 +01:00
fix: exclude JS API docs from prose docs
This commit is contained in:
@@ -70,7 +70,11 @@ export async function parseTypescriptAst(
|
||||
project.symbols.push(...parseModule(mod));
|
||||
} else {
|
||||
console.error(
|
||||
`Detected a "${mod.kindString}" node at the root level; we would expect only Namespace/module definitions at the root level`
|
||||
`- detected a ${mod.kindString} node with a name of "${
|
||||
mod.name
|
||||
}" at the root level; we would expect only Namespace/module definitions at the root level${
|
||||
mod.comment ? `\n\tcomment: ${mod.comment}` : ""
|
||||
}`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -53,7 +53,9 @@ function reduceClutter(
|
||||
download_url: f.download_url as string,
|
||||
}));
|
||||
|
||||
const children = resp.filter((i) => i.type === "dir").map((d) => d.name);
|
||||
const children = resp
|
||||
.filter((i) => i.type === "dir" && !i.name.startsWith(".") && i.name !== "api")
|
||||
.map((d) => d.name);
|
||||
|
||||
return [files, children];
|
||||
}
|
||||
@@ -71,9 +73,11 @@ async function getStructure(o: IEnv) {
|
||||
if (children.length > 0) {
|
||||
const waitFor: Promise<IDocsSitemap>[] = [];
|
||||
for (const child of children) {
|
||||
if (child.startsWith("_")) {
|
||||
if (child.startsWith("_" || child.startsWith(".") || child === "api")) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(`- skipping the "${child}" directory due to leading underscore`);
|
||||
console.log(
|
||||
`- skipping the "${child}" directory due to leading directory character`
|
||||
);
|
||||
} else {
|
||||
const p = join(o.docsPath, `/${child}`);
|
||||
const mo: IEnv = { ...o, docsPath: p };
|
||||
|
||||
Reference in New Issue
Block a user