Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/molt/mod.ts>collect

Update dependencies the Deno way
Latest
function collect
import { collect } from "https://deno.land/x/molt@0.17.2/mod.ts";

Collect dependencies from the given module(s) or Deno configuration file(s). Local submodules are also checked recursively.

Examples

Example 1

collect("mod.ts")
// -> Collect dependencies from mod.ts and its local submodules.

Example 2

collect("deno.json")
// -> Collect dependencies from the import map specified in deno.json

Parameters

from: string | URL | (string | URL)[]
  • The path(s) to the file(s) to collect dependencies from.
optional
options: CollectOptions = [UNSUPPORTED]
  • Options to customize the behavior.

Returns

Promise<CollectResult>

The list of dependencies.