Managing dependencies
- Deno uses URLs for dependency management.
- One convention places all these dependent URLs into a local file.
Functionality is then exported out of
deps.ts
for use by local modules. - Continuing this convention, dev only dependencies can be kept in a
dev_deps.ts
file. - See also Linking to external code
/**
*/
import { add, multiply } from "./deps.ts";
function totalCost(outbound: number, inbound: number, tax: number): number {
return multiply(add(outbound, inbound), tax);
console.log(totalCost(45, 27, 1.15));
/**
* Output
*
* 60
*/