https://github.com/denolib/awesome-deno
- Install Deno
brew install deno
- Setup vscode Deno plugin
axetroy.vscode-deno
- Go through https://deno.land/manual/getting_started/first_steps
- remote hello world
deno run https://deno.land/std/examples/welcome.ts
- local hello world
deno run scripts/local-hello-world.ts
- hello world server
deno run --allow-net scripts/hello-world-server.ts
- fetch a file
deno run --allow-net=example.com scripts/fetch-url.ts http://example.com
- read a file
deno run --allow-read=./scripts scripts/read-file.ts scripts/read-file.ts
deno run --lock=lock.json --lock-write ...
currently not working for me
- set
DENO_DIR
environment variable DENO_DIR=.deno deno run https://deno.land/std/examples/welcome.ts
- create a deps file
deps.ts
- Re export from url imports
export { Application, HandlerFunc } from "https://deno.land/x/abc/mod.ts";
deno fmt --check
check for errorsdeno fmt
auto format
https://github.com/zhmushan/abc
deno run --allow-net scripts/abc-hello-world.ts
deno run --allow-net scripts/abc-params.ts
- TS support built in
- Secure permissions system
- Built in tools
- formatter
- bundler
- test framework
- debugger
- std library
- node compat library (still in early works)
- built using rust
- ES module system built in (no require or module.exports)
- Web compat when appropriate
- No package manager
- I like not having to rely on one central repo
- Having a
deps.ts
file mitigates most of the problems
- No script runner
- most npm packages are not compatible <- this is a big one