38dc4f78222952352de781f4e2f13ce3fb51495f
[webi-installers/.git] / deno / README.md
1 ---
2 title: Deno
3 homepage: https://github.com/denoland/deno
4 tagline: |
5   Deno: A secure runtime for JavaScript and TypeScript.
6 ---
7
8 ## Updating `deno`
9
10 ```bash
11 webi deno@stable
12 ```
13
14 Use the `@beta` tag for pre-releases, or `@x.y.z` for a specific version.
15
16 ## Cheat Sheet
17
18 > Deno proves that lightning does strike twice. It's the ease of use of node,
19 > the intentional tooling of Go, and built in Rust.
20
21 ### Hello World
22
23 The obligatory Hello World
24
25 ```bash
26 deno run https://deno.land/std/examples/welcome.ts
27 ```
28
29 Run a local file
30
31 ```bash
32 deno run ./hello.ts
33 ```
34
35 Enable [permissions](https://deno.land/manual/getting_started/permissions)
36
37 ```bash
38 deno run --allow-read=./data,./public --allow-write=./data \
39   --allow-net=example.com,example.net ./hello.ts
40 ```
41
42 Format source code, recursively
43
44 ```bash
45 deno fmt ./my-project
46 ```