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

Tutorial

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

deno run 01_hello_world/index.ts

Import and Exports

Tutorial

Local imports use relative paths. Add the extensions.

Remote imports use urls.

Example URL: https://deno.land/x/ramda@v0.27.2.

You can find modules on their website.

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

Managing dependencies

Tutorial

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

Tutorial

Left Off


Written by Jeremy Wong and published on .