Craft By Zen

📖 1 min read

🔖 learning   programming   node   deno

Notes: Deno

I am following version 1.13.2: Intro docs for Deno

Hello World


Running the following command in our tutorial folder uses deno as a runtime.

deno run 01_hello_world/index.ts

Import and Exports


Local imports use relative paths. Add the extensions.

Remote imports use urls.

Example URL:

You can find modules on their website.

Prepend export for constants, classes, functions and variables to expose them.

Managing dependencies


There are two ways to handle dependencies.

  1. Using URL link
  2. Using deps.ts

To add a lockfile (useful for locking dependencies), use the --lock flag.

# Create/update the lock file "lock.json".
deno cache --lock=lock.json --lock-write deps.ts

More on integrity checking.

Fetch data


Left Off

Written by Jeremy Wong and published on .