mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-07-27 14:55:26 +02:00

* deno: update examples * fix trailing spaces * Update pages/common/deno.md Co-authored-by: Managor <42655600+Managor@users.noreply.github.com> * Update pages/common/deno.md Co-authored-by: Managor <42655600+Managor@users.noreply.github.com> * Update pages/common/deno.md Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com> * Update pages/common/deno.md Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com> * Update pages/common/deno.md Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com> --------- Co-authored-by: Managor <42655600+Managor@users.noreply.github.com> Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
1.1 KiB
1.1 KiB
deno
A secure runtime for JavaScript, TypeScript, and WebAssembly. Includes dependency management using
npm
orjsr
, and tooling like bench, bundle, doc, and coverage. More information: https://docs.deno.com/runtime/reference/cli.
- Start a REPL (interactive shell, also known as Read-Eval-Print Loop):
deno
- Start a new project named sample and test it:
deno init sample && cd sample && deno test
- Run a file securely. It will ask (if needed) to allow net, read, etc:
deno run {{path/to/file.ts}}
- Run a file with explicit permissions or allow all (only if you trust the source):
deno run {{[--allow-env|--allow-net|--allow-write|--allow-all]}} {{jsr:@deno/deployctl}}
- List and run tasks from
deno.json
or scripts frompackage.json
:
deno task
- Install dependencies listed in
deno.json
orpackage.json
(also lock files):
deno install
- Check types, format, and lint (fix if possible):
deno check && deno fmt && deno lint --fix
- Compile the script, imported dependencies, and runtime into a self contained executable:
deno compile {{path/to/file.ts}}