summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBert Belder <bertbelder@gmail.com>2020-05-17 19:24:39 +0200
committerGitHub <noreply@github.com>2020-05-17 19:24:39 +0200
commit36fde75d779078118af3b2b6c078bcbfb47b1a0f (patch)
treec3cef9095b5c4ef762edc535be28d4e112928db4
parenteddb916883901385233bea24313e2920fcac5388 (diff)
Miscellaneous documentation and spelling improvements (#5527)
* Extended/updated documentation on code editor setup and plugins. * Moved documentation to the right file. * Fixed spelling errors in documentation and code. * Updated broken links. Co-authored-by: 迷渡 <justjavac@gmail.com> Co-authored-by: AlfieriChou <alfierichou@gmail.com> Co-authored-by: Anil Seervi <anil13112000@gmail.com Co-authored-by: Bert Belder <bertbelder@gmail.com> Co-authored-by: Fernando Basso <fernandobasso.br@gmail.com> Co-authored-by: József Sallai <jozsef@sallai.me> Co-authored-by: S4ltyGo4t <mario.weidner@gmx.de> Co-authored-by: Tommy May <tommymay37@gmail.com> Co-authored-by: Turbinya <wownucleos@gmail.com> Co-authored-by: ᴜɴвʏтᴇ <i@shangyes.net>
-rw-r--r--cli/flags.rs4
-rw-r--r--cli/js/lib.deno.ns.d.ts4
-rw-r--r--cli/js/lib.deno.unstable.d.ts2
-rw-r--r--core/isolate.rs7
-rw-r--r--docs/getting_started/setup_your_environment.md18
-rw-r--r--docs/runtime/program_lifecycle.md2
-rw-r--r--std/fmt/README.md2
-rw-r--r--std/fs/README.md20
-rw-r--r--std/fs/empty_dir.ts2
-rw-r--r--std/http/cookie.ts2
-rw-r--r--std/io/ioutil.ts2
-rw-r--r--std/manual.md1
-rw-r--r--std/path/README.md15
13 files changed, 47 insertions, 34 deletions
diff --git a/cli/flags.rs b/cli/flags.rs
index ef3f75e23..15902a3c2 100644
--- a/cli/flags.rs
+++ b/cli/flags.rs
@@ -184,7 +184,7 @@ static ENV_VARIABLES_HELP: &str = "ENVIRONMENT VARIABLES:
static DENO_HELP: &str = "A secure JavaScript and TypeScript runtime
-Docs: https://deno.land/std/manual.md
+Docs: https://deno.land/manual
Modules: https://deno.land/std/ https://deno.land/x/
Bugs: https://github.com/denoland/deno/issues
@@ -1194,7 +1194,7 @@ fn importmap_arg<'a, 'b>() -> Arg<'a, 'b> {
.long_help(
"UNSTABLE:
Load import map file
-Docs: https://deno.land/std/manual.md#import-maps
+Docs: https://deno.land/manual/linking_to_external_code/import_maps
Specification: https://wicg.github.io/import-maps/
Examples: https://github.com/WICG/import-maps#the-import-map",
)
diff --git a/cli/js/lib.deno.ns.d.ts b/cli/js/lib.deno.ns.d.ts
index 9acdd7c1a..f73a1fdda 100644
--- a/cli/js/lib.deno.ns.d.ts
+++ b/cli/js/lib.deno.ns.d.ts
@@ -1638,9 +1638,9 @@ declare namespace Deno {
bytesReceived: number;
}
- /** Receive metrics from the privileged side of Deno. This is primarily used
+ /** Receive metrics from the privileged side of Deno. This is primarily used
* in the development of Deno. 'Ops', also called 'bindings', are the go-between
- * between Deno Javascript and Deno Rust.
+ * between Deno JavaScript and Deno Rust.
*
* > console.table(Deno.metrics())
* ┌─────────────────────────┬────────┐
diff --git a/cli/js/lib.deno.unstable.d.ts b/cli/js/lib.deno.unstable.d.ts
index d34d86636..d27a3da9e 100644
--- a/cli/js/lib.deno.unstable.d.ts
+++ b/cli/js/lib.deno.unstable.d.ts
@@ -652,7 +652,7 @@ declare namespace Deno {
/** **UNSTABLE**: new API, yet to be vetted.
*
* `bundle()` is part the compiler API. A full description of this functionality
- * can be found in the [manual](https://deno.land/std/manual.md#denobundle).
+ * can be found in the [manual](https://deno.land/manual/runtime/compiler_apis#denobundle).
*
* Takes a root module name, and optionally a record set of sources. Resolves
* with a single JavaScript string (and bundle diagnostics if issues arise with
diff --git a/core/isolate.rs b/core/isolate.rs
index d017687c6..13892c2d9 100644
--- a/core/isolate.rs
+++ b/core/isolate.rs
@@ -128,9 +128,8 @@ pub enum Snapshot {
Boxed(Box<[u8]>),
}
-/// Represents data used to initialize isolate at startup
-/// either a binary snapshot or a javascript source file
-/// in the form of the StartupScript struct.
+/// Represents data used to initialize an isolate at startup, either
+/// in the form of a binary snapshot or a JavaScript source file.
pub enum StartupData<'a> {
Script(Script<'a>),
Snapshot(Snapshot),
@@ -142,7 +141,7 @@ type IsolateErrorHandleFn = dyn FnMut(ErrBox) -> Result<(), ErrBox>;
/// A single execution context of JavaScript. Corresponds roughly to the "Web
/// Worker" concept in the DOM. An CoreIsolate is a Future that can be used with
-/// Tokio. The CoreIsolate future complete when there is an error or when all
+/// Tokio. The CoreIsolate future completes when there is an error or when all
/// pending ops have completed.
///
/// Ops are created in JavaScript by calling Deno.core.dispatch(), and in Rust
diff --git a/docs/getting_started/setup_your_environment.md b/docs/getting_started/setup_your_environment.md
index 20992c1b1..a0d04b385 100644
--- a/docs/getting_started/setup_your_environment.md
+++ b/docs/getting_started/setup_your_environment.md
@@ -45,8 +45,14 @@ or imports having unnecessary file extensions.
The community has developed extensions for some editors to solve these issues:
-- [VS Code](https://marketplace.visualstudio.com/items?itemName=axetroy.vscode-deno)
- by [@axetroy](https://github.com/axetroy).
+#### VS Code
+
+The beta version of [vscode_deno](https://github.com/denoland/vscode_deno) is
+published on the
+[Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=justjavac.vscode-deno).
+Please report any issues.
+
+#### JetBrains IDEs
Support for JetBrains IDEs is not yet available, but you can follow and upvote
these issues to stay up to date:
@@ -55,6 +61,14 @@ these issues to stay up to date:
- https://youtrack.jetbrains.com/issue/WEB-42983
- https://youtrack.jetbrains.com/issue/WEB-31667
+#### Vim and NeoVim
+
+Vim works fairly well for Deno/TypeScript if you install
+[CoC](https://github.com/neoclide/coc.nvim) (intellisense engine and language
+server protocol). After CoC itself is installed, from inside Vim, simply run
+`:CocInstall coc-deno`. From now on, things like `gd` (go to definition) and
+`gr` (goto/find references) should work.
+
If you don't see your favorite IDE on this list, maybe you can develop an
extension. Our [community Discord group](https://discord.gg/TGMHGv6) can give
you some pointers on where to get started.
diff --git a/docs/runtime/program_lifecycle.md b/docs/runtime/program_lifecycle.md
index 62698b35e..df8bbac65 100644
--- a/docs/runtime/program_lifecycle.md
+++ b/docs/runtime/program_lifecycle.md
@@ -66,5 +66,5 @@ got unload event in event handler (main)
```
All listeners added using `window.addEventListener` were run, but
-`window.onload` and `window.onunload` defined in `main.ts` overridden handlers
+`window.onload` and `window.onunload` defined in `main.ts` overrode handlers
defined in `imported.ts`.
diff --git a/std/fmt/README.md b/std/fmt/README.md
index f7d2ce797..48f7c50db 100644
--- a/std/fmt/README.md
+++ b/std/fmt/README.md
@@ -35,7 +35,7 @@ This is very much a work-in-progress. I'm actively soliciting feedback.
format each element according to the format (surrounded by [] and separated by
comma) (`<` Mnemonic: pull each element out of array)
-- how to deal with more newfangled Javascript features ( generic Iterables, Map
+- how to deal with more newfangled JavaScript features (generic Iterables, Map
and Set types, typed Arrays, ...)
- the implementation is fairly rough around the edges:
diff --git a/std/fs/README.md b/std/fs/README.md
index 288f1922f..a8b2c9614 100644
--- a/std/fs/README.md
+++ b/std/fs/README.md
@@ -4,7 +4,8 @@ fs module is made to provide helpers to manipulate the filesystem.
## Usage
-All the following modules are exposed in `mod.ts`
+All the following modules are exposed in `mod.ts` This feature is currently
+unstable. To enable it use `deno run --unstable`
### emptyDir
@@ -59,7 +60,7 @@ ensureSymlink("./folder/targetFile.dat", "./folder/targetFile.link.dat"); // ret
ensureSymlinkSync("./folder/targetFile.dat", "./folder/targetFile.link.dat"); // void
```
-### eol
+### EOL
Detects and format the passed string for the targeted End Of Line character.
@@ -91,21 +92,6 @@ exists("./foo"); // returns a Promise<boolean>
existsSync("./foo"); // returns boolean
```
-### globToRegExp
-
-Generate a regex based on glob pattern and options This was meant to be using
-the the `fs.walk` function but can be used anywhere else.
-
-```ts
-import { globToRegExp } from "https://deno.land/std/fs/mod.ts";
-
-globToRegExp("foo/**/*.json", {
- flags: "g",
- extended: true,
- globstar: true,
-}); // returns the regex to find all .json files in the folder foo
-```
-
### move
Moves a file or directory. Overwrites it if option provided
diff --git a/std/fs/empty_dir.ts b/std/fs/empty_dir.ts
index de52890a3..2f5d2deeb 100644
--- a/std/fs/empty_dir.ts
+++ b/std/fs/empty_dir.ts
@@ -43,7 +43,7 @@ export function emptyDirSync(dir: string): void {
try {
const items = [...readDirSync(dir)];
- // if directory already exist. then remove it's child item.
+ // If the directory exists, remove all entries inside it.
while (items.length) {
const item = items.shift();
if (item && item.name) {
diff --git a/std/http/cookie.ts b/std/http/cookie.ts
index 43cf3f486..521cb6ded 100644
--- a/std/http/cookie.ts
+++ b/std/http/cookie.ts
@@ -24,7 +24,7 @@ export interface Cookie {
path?: string;
/** Indicates if the cookie is made using SSL & HTTPS. */
secure?: boolean;
- /** Indicates that cookie is not accessible via Javascript. **/
+ /** Indicates that cookie is not accessible via JavaScript. **/
httpOnly?: boolean;
/** Allows servers to assert that a cookie ought not to
* be sent along with cross-site requests. */
diff --git a/std/io/ioutil.ts b/std/io/ioutil.ts
index c7b92fc1d..aff9f05e2 100644
--- a/std/io/ioutil.ts
+++ b/std/io/ioutil.ts
@@ -67,7 +67,7 @@ export async function readLong(buf: BufReader): Promise<number | null> {
// We probably should provide a similar API that returns BigInt values.
if (big > MAX_SAFE_INTEGER) {
throw new RangeError(
- "Long value too big to be represented as a Javascript number."
+ "Long value too big to be represented as a JavaScript number."
);
}
return Number(big);
diff --git a/std/manual.md b/std/manual.md
deleted file mode 100644
index 8d3cbb5aa..000000000
--- a/std/manual.md
+++ /dev/null
@@ -1 +0,0 @@
-# The manual has moved to //docs
diff --git a/std/path/README.md b/std/path/README.md
index a1f3f425d..9a9361f87 100644
--- a/std/path/README.md
+++ b/std/path/README.md
@@ -5,3 +5,18 @@ Usage:
```ts
import * as path from "https://deno.land/std/path/mod.ts";
```
+
+### globToRegExp
+
+Generate a regex based on glob pattern and options This was meant to be using
+the the `fs.walk` function but can be used anywhere else.
+
+```ts
+import { globToRegExp } from "https://deno.land/std/path/glob.ts";
+
+globToRegExp("foo/**/*.json", {
+ flags: "g",
+ extended: true,
+ globstar: true,
+}); // returns the regex to find all .json files in the folder foo
+```