You are viewing documentation generated from a user contribution or an upcoming release. The contents of this document may not have been reviewed by the Deno team. Click here to view the documentation for the latest release.

Vendoring Dependencies

deno vendor <specifiers>... will download all remote dependencies of the specified modules into a local vendor folder. For example:

# Vendor the remote dependencies of main.ts
$ deno vendor main.ts

# Example file system tree
$ tree
├── main.ts
└── vendor
    ├── import_map.json

# Check the directory into source control
$ git add -u vendor
$ git commit

To then use the vendored dependencies in your program, just add --import-map=vendor/import_map.json to your Deno invocations. You can also add --no-remote to your invocation to completely disable fetching of remote modules to ensure it's using the modules in the vendor directory.

deno run --no-remote --import-map=vendor/import_map.json main.ts

Note that you may specify multiple modules and remote modules when vendoring.

deno vendor main.ts test.deps.ts

Run deno vendor --help for more details.