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: 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
There are two ways to handle dependencies.
- Using URL link
- 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
Fetch data
Left Off
Written by Jeremy Wong and published on .