Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
latest
denoland/deno_cache_dirWorks with
•JSR Score82%•This package works with Deno
Downloads3,808/wk
•Published8 months ago (0.27.0)
Deno CLI's module cache.
A module which provides a TypeScript implementation of the Deno CLI's cache
directory logic (DENO_DIR). This can be used in combination with other
modules to provide user loadable APIs that are like the Deno CLI's
functionality.
This also can provide user read access in Deploy to a Deno CLI's cache when the cache is checked into the repository.
Example
import { createCache } from "@deno/cache-dir"; import { createGraph } from "@deno/graph"; // create a cache where the location will be determined environmentally const cache = createCache(); // destructuring the two functions we need to pass to the graph const { cacheInfo, load } = cache; // create a graph that will use the cache above to load and cache dependencies const graph = await createGraph("https://deno.land/x/oak@v9.0.1/mod.ts", { cacheInfo, load, }); // log out the console a similar output to `deno info` on the command line. console.log(graph.toString());
Built and signed on
GitHub Actions
Add Package
deno add jsr:@deno/cache-dir
Import symbol
import * as cache_dir from "@deno/cache-dir";
Import directly with a jsr specifier
import * as cache_dir from "jsr:@deno/cache-dir@^0.27.0";