📝 Edit page
➕ Add page
Deps files
About
There is Deno community convention of putting all dependencies in a central file. With second file for test dependencies if needed.
deps.tstest_depts.ts
Those act kind of like package.json for managing dependencies and versions centrally.
Example
Assert from the docs
Based on Deno docs:
deps.ts- useexportdirectly without doing an import.export { assert, assertEquals, assertStrContains, } from "https://deno.land/std@0.85.0/testing/asserts.ts";index.ts- import from the deps file instead of from URLs.import { assertEquals, runTests, test } from "./deps.ts"; assertEquals("hello", "hello");
Oak
See also deps.ts in Oak. Or as documentation.