0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-30 09:08:00 -04:00
denoland-deno/examples
2019-07-11 05:58:18 -04:00
..
cat.ts Use Deno global var instead of built-in "deno" module (denoland/deno_std#247) 2019-03-07 19:25:16 -05:00
catj.ts Rename catjson.ts to catj.ts (denoland/deno_std#533) 2019-07-11 05:58:18 -04:00
colors.ts Documentation clean up (denoland/deno_std#288) 2019-03-18 11:08:01 -04:00
echo_server.ts Eslint fixes (denoland/deno_std#356) 2019-04-24 07:41:22 -04:00
gist.ts lint: add max line length rules (denoland/deno_std#507) 2019-06-18 21:22:01 -07:00
README.md Rename catjson.ts to catj.ts (denoland/deno_std#533) 2019-07-11 05:58:18 -04:00
test.ts bump CI to v0.4.0 (denoland/deno_std#378) 2019-05-04 11:33:50 -04:00

Deno example programs

This module contains small scripts that demonstrate use of Deno and its standard library.

You can run these examples by importing them via deno command:

> deno https://deno.land/std/examples/echo_server.ts --allow-net

Some of them are useful CLI programs that can be installed as executables:

cat.ts - print file to standard output

deno install deno_cat https://deno.land/examples.cat.ts --allow-read
deno_cat file.txt

catj.ts - print flattened JSON to standard output

deno install catj https://deno.land/examples/catj.ts --allow-read
catj example.json
catj file1.json file2.json
echo example.json | catj -

gist.ts - easily create and upload Gists

deno install gist https://deno.land/examples/gist.ts --allow-net --allow-env
export GIST_TOKEN=ABC # Generate at https://github.com/settings/tokens
gist --title "Example gist 1" script.ts
gist --t "Example gist 2" script2.ts