summaryrefslogtreecommitdiff
path: root/docs/examples
diff options
context:
space:
mode:
Diffstat (limited to 'docs/examples')
-rw-r--r--docs/examples/fetch_data.md4
-rw-r--r--docs/examples/file_server.md4
-rw-r--r--docs/examples/file_system_events.md4
-rw-r--r--docs/examples/hello_world.md2
-rw-r--r--docs/examples/http_server.md8
-rw-r--r--docs/examples/import_export.md4
-rw-r--r--docs/examples/manage_dependencies.md2
-rw-r--r--docs/examples/module_metadata.md10
-rw-r--r--docs/examples/os_signals.md6
-rw-r--r--docs/examples/read_write_files.md6
-rw-r--r--docs/examples/subprocess.md8
-rw-r--r--docs/examples/tcp_echo.md4
-rw-r--r--docs/examples/unix_cat.md10
13 files changed, 36 insertions, 36 deletions
diff --git a/docs/examples/fetch_data.md b/docs/examples/fetch_data.md
index 4cd22bf2f..4b3dafce2 100644
--- a/docs/examples/fetch_data.md
+++ b/docs/examples/fetch_data.md
@@ -5,8 +5,8 @@
- Like browsers, Deno implements web standard APIs such as
[fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API).
- Deno is secure by default, meaning explicit permission must be granted to
- access the network
-- See also: Deno's [permissions](../getting_started/permissions.md) model
+ access the network.
+- See also: Deno's [permissions](../getting_started/permissions.md) model.
## Overview
diff --git a/docs/examples/file_server.md b/docs/examples/file_server.md
index 7235c84ad..57a6d710a 100644
--- a/docs/examples/file_server.md
+++ b/docs/examples/file_server.md
@@ -4,9 +4,9 @@
- Use the Deno standard library
[file_server.ts](https://deno.land/std@$STD_VERSION/http/file_server.ts) to
- run your own file server and access your files from your web browser
+ run your own file server and access your files from your web browser.
- Run [Deno install](../tools/script_installer.md) to install the file server
- locally
+ locally.
## Example
diff --git a/docs/examples/file_system_events.md b/docs/examples/file_system_events.md
index 1d483b4a0..ba61d9284 100644
--- a/docs/examples/file_system_events.md
+++ b/docs/examples/file_system_events.md
@@ -3,8 +3,8 @@
## Concepts
- Use [Deno.watchFs](https://doc.deno.land/builtin/stable#Deno.watchFs) to watch
- for file system events
-- Results may vary between operating systems
+ for file system events.
+- Results may vary between operating systems.
## Example
diff --git a/docs/examples/hello_world.md b/docs/examples/hello_world.md
index 11418c19c..cb45e5393 100644
--- a/docs/examples/hello_world.md
+++ b/docs/examples/hello_world.md
@@ -3,7 +3,7 @@
## Concepts
- Deno can run JavaScript or TypeScript out of the box with no additional tools
- or config required
+ or config required.
## Overview
diff --git a/docs/examples/http_server.md b/docs/examples/http_server.md
index 21a9f8b5b..5c793c6ea 100644
--- a/docs/examples/http_server.md
+++ b/docs/examples/http_server.md
@@ -3,7 +3,7 @@
## Concepts
- Use the std library [http module](https://deno.land/std@$STD_VERSION/http) to
- run your own web server
+ run your own web server.
## Overview
@@ -12,11 +12,11 @@ over the response status, request headers and more.
## Sample web server
-In this example, the user-agent of the client is returned to the client
+In this example, the user-agent of the client is returned to the client:
```typescript
-/**
- * webserver.ts
+/**
+ * webserver.ts
*/
import { serve } from "https://deno.land/std@$STD_VERSION/http/server.ts";
diff --git a/docs/examples/import_export.md b/docs/examples/import_export.md
index e036f874d..e87980bc7 100644
--- a/docs/examples/import_export.md
+++ b/docs/examples/import_export.md
@@ -5,10 +5,10 @@
- [import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import)
allows you to include and use modules held elsewhere, on your local file
system or remotely.
-- Imports are URLs or file system paths
+- Imports are URLs or file system paths.
- [export](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export)
allows you to specify which parts of your module are accessible to users who
- import your module
+ import your module.
## Overview
diff --git a/docs/examples/manage_dependencies.md b/docs/examples/manage_dependencies.md
index 357eccb4b..ed5df9710 100644
--- a/docs/examples/manage_dependencies.md
+++ b/docs/examples/manage_dependencies.md
@@ -2,7 +2,7 @@
## Concepts
-- Deno uses URLs for dependency management
+- Deno uses URLs for dependency management.
- One convention places all these dependent URLs into a local `deps.ts` file.
Functionality is then exported out of `deps.ts` for use by local modules.
- Continuing this convention, dev only dependencies can be kept in a
diff --git a/docs/examples/module_metadata.md b/docs/examples/module_metadata.md
index 8d2d92b50..c58c82648 100644
--- a/docs/examples/module_metadata.md
+++ b/docs/examples/module_metadata.md
@@ -3,22 +3,22 @@
## Concepts
- [import.meta](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import.meta)
- can provide information on the context of the module
+ can provide information on the context of the module.
- The boolean
[import.meta.main](https://doc.deno.land/builtin/stable#ImportMeta) will let
- you know if the current module is the program entry point
+ you know if the current module is the program entry point.
- The string [import.meta.url](https://doc.deno.land/builtin/stable#ImportMeta)
- will give you the URL of the current module
+ will give you the URL of the current module.
- The string
[Deno.mainModule](https://doc.deno.land/builtin/stable#Deno.mainModule) will
give you the URL of the main module entry point, i.e. the module invoked by
- the deno runtime
+ the deno runtime.
## Example
The example below uses two modules to show the difference between
`import.meta.url`, `import.meta.main` and `Deno.mainModule`. In this example,
-`module_a.ts` is the main module entry point
+`module_a.ts` is the main module entry point:
```ts
/**
diff --git a/docs/examples/os_signals.md b/docs/examples/os_signals.md
index e4d7bc43a..e49c3eb76 100644
--- a/docs/examples/os_signals.md
+++ b/docs/examples/os_signals.md
@@ -5,12 +5,12 @@
## Concepts
-- Use the `--unstable` flag to access new or unstable features in Deno
+- Use the `--unstable` flag to access new or unstable features in Deno.
- [Deno.signal](https://doc.deno.land/builtin/unstable#Deno.signal) can be used
- to capture and monitor OS signals
+ to capture and monitor OS signals.
- Use the `dispose()` function of the Deno.signal
[SignalStream](https://doc.deno.land/builtin/unstable#Deno.SignalStream) to
- stop watching the signal
+ stop watching the signal.
## Async iterator example
diff --git a/docs/examples/read_write_files.md b/docs/examples/read_write_files.md
index ed49f0159..0840c35d4 100644
--- a/docs/examples/read_write_files.md
+++ b/docs/examples/read_write_files.md
@@ -6,13 +6,13 @@
[Deno.readTextFile](https://doc.deno.land/builtin/stable#Deno.readTextFile)
and
[Deno.writeTextFile](https://doc.deno.land/builtin/stable#Deno.writeTextFile)
- asynchronous functions for reading and writing entire text files
+ asynchronous functions for reading and writing entire text files.
- Like many of Deno's APIs, synchronous alternatives are also available. See
[Deno.readTextFileSync](https://doc.deno.land/builtin/stable#Deno.readTextFileSync)
and
- [Deno.writeTextFileSync](https://doc.deno.land/builtin/stable#Deno.writeTextFileSync)
+ [Deno.writeTextFileSync](https://doc.deno.land/builtin/stable#Deno.writeTextFileSync).
- Use `--allow-read` and `--allow-write` permissions to gain access to the file
- system
+ system.
## Overview
diff --git a/docs/examples/subprocess.md b/docs/examples/subprocess.md
index fad6c71bf..137e7d6b4 100644
--- a/docs/examples/subprocess.md
+++ b/docs/examples/subprocess.md
@@ -3,13 +3,13 @@
## Concepts
- Deno is capable of spawning a subprocess via
- [Deno.run](https://doc.deno.land/builtin/stable#Deno.run)
-- `--allow-run` permission is required to spawn a subprocess
-- Spawned subprocesses do not run in a security sandbox
+ [Deno.run](https://doc.deno.land/builtin/stable#Deno.run).
+- `--allow-run` permission is required to spawn a subprocess.
+- Spawned subprocesses do not run in a security sandbox.
- Communicate with the subprocess via the
[stdin](https://doc.deno.land/builtin/stable#Deno.stdin),
[stdout](https://doc.deno.land/builtin/stable#Deno.stdout) and
- [stderr](https://doc.deno.land/builtin/stable#Deno.stderr) streams
+ [stderr](https://doc.deno.land/builtin/stable#Deno.stderr) streams.
## Simple example
diff --git a/docs/examples/tcp_echo.md b/docs/examples/tcp_echo.md
index ba70aa795..7e3267c51 100644
--- a/docs/examples/tcp_echo.md
+++ b/docs/examples/tcp_echo.md
@@ -3,9 +3,9 @@
## Concepts
- Listening for TCP port connections with
- [Deno.listen](https://doc.deno.land/builtin/stable#Deno.listen)
+ [Deno.listen](https://doc.deno.land/builtin/stable#Deno.listen).
- Use [Deno.copy](https://doc.deno.land/builtin/stable#Deno.copy) to take
- inbound data and redirect it to be outbound data
+ inbound data and redirect it to be outbound data.
## Example
diff --git a/docs/examples/unix_cat.md b/docs/examples/unix_cat.md
index f93d9c94d..b8c6c0d21 100644
--- a/docs/examples/unix_cat.md
+++ b/docs/examples/unix_cat.md
@@ -2,15 +2,15 @@
## Concepts
-- Use the Deno runtime API to output the contents of a file to the console
+- Use the Deno runtime API to output the contents of a file to the console.
- [Deno.args](https://doc.deno.land/builtin/stable#Deno.args) accesses the
- command line arguments
+ command line arguments.
- [Deno.open](https://doc.deno.land/builtin/stable#Deno.open) is used to get a
- handle to a file
+ handle to a file.
- [Deno.copy](https://doc.deno.land/builtin/stable#Deno.copy) is used to
- transfer data from the file to the output stream
+ transfer data from the file to the output stream.
- Files should be closed when you are finished with them
-- Modules can be run directly from remote URLs
+- Modules can be run directly from remote URLs.
## Example