diff --git a/cli/flags.rs b/cli/flags.rs index ef3f75e233..15902a3c2e 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 9acdd7c1a1..f73a1fdda3 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 d34d86636a..d27a3da9ec 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 d017687c65..13892c2d9a 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 20992c1b1d..a0d04b3850 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 62698b35eb..df8bbac659 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 f7d2ce7976..48f7c50db5 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 288f1922fe..a8b2c96144 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 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 de52890a32..2f5d2deebe 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 43cf3f4869..521cb6ded5 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 c7b92fc1d2..aff9f05e2c 100644 --- a/std/io/ioutil.ts +++ b/std/io/ioutil.ts @@ -67,7 +67,7 @@ export async function readLong(buf: BufReader): Promise { // 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 8d3cbb5aaf..0000000000 --- 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 a1f3f425d1..9a9361f87e 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 +```