Karel
Karel
DDeno
Created by Karel on 1/6/2024 in #help
Module documentation preview in development
I was able to work around the deno_doc issue by bypassing NPM loading:
import { doc } from "https://deno.land/x/deno_doc@0.86.0/mod.ts";
import { load as defaultLoad } from "https://deno.land/x/deno_graph@0.53.0/loader.ts";

function load(specifier: string) {
if (specifier.startsWith("npm:")) {
return Promise.resolve({
"kind": "external" as const,
"specifier": specifier,
});
}
return defaultLoad(specifier);
}

const docNodes = await doc("file:///C:/Users/Me/Project/mod.ts", { load });
import { doc } from "https://deno.land/x/deno_doc@0.86.0/mod.ts";
import { load as defaultLoad } from "https://deno.land/x/deno_graph@0.53.0/loader.ts";

function load(specifier: string) {
if (specifier.startsWith("npm:")) {
return Promise.resolve({
"kind": "external" as const,
"specifier": specifier,
});
}
return defaultLoad(specifier);
}

const docNodes = await doc("file:///C:/Users/Me/Project/mod.ts", { load });
Not sure if this is the right approach though.
3 replies
DDeno
Created by Karel on 11/14/2023 in #help
Best hardware for Deno development?
Thank you for sharing your experience. I was thinking about switching to Linux on my current hardware, I will give it a shot. I tried to investigate why there are the lags, but to no avail. My workspace is pretty straightforward, the project is not too big, there is no node_modules, I am using only deno dependencies (no npm). I do have some complex TypeScript stuff going on, but at the same time we're talking only about few thousand lines of code. I would expect that my machine would handle that. @raunioroo Why did you choose Linux Mint? Did you consider any other distros?
9 replies