fix dev server responsiveness
This commit is contained in:
parent
fb2dffbba7
commit
ac890c9abd
7
dev.ts
7
dev.ts
@ -31,8 +31,11 @@ async function watchAndBuildDocs() {
|
|||||||
changeOccurred = false;
|
changeOccurred = false;
|
||||||
running = false;
|
running = false;
|
||||||
}, 250);
|
}, 250);
|
||||||
const watcher = Deno.watchFs(["docs/src"]);
|
const watcher = Deno.watchFs(["docs"]);
|
||||||
for await (const _ of watcher) {
|
for await (const ev of watcher) {
|
||||||
|
if (ev.paths.every((x) => x.includes("/docs/-/"))) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
changeOccurred = true;
|
changeOccurred = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ function injectIntoTemplate(
|
|||||||
"</head>",
|
"</head>",
|
||||||
"<body>",
|
"<body>",
|
||||||
[
|
[
|
||||||
`<nav>${breadcrumbs.join(" / ")}</nav>`,
|
`<nav><a href="/">Back to playground</a> | ${breadcrumbs.join(" / ")}</nav>`,
|
||||||
rendered,
|
rendered,
|
||||||
],
|
],
|
||||||
"</body>",
|
"</body>",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user