diff options
author | Nayeem Rahman <muhammed.9939@gmail.com> | 2019-12-20 20:21:30 +0000 |
---|---|---|
committer | Ry Dahl <ry@tinyclouds.org> | 2019-12-20 15:21:30 -0500 |
commit | e8d82a6348d4cf9fc6a023fe16bf75df7fea61b0 (patch) | |
tree | 6d9e44694bf55a7e3089b1706dc05919ccc0dc27 /std/manual.md | |
parent | 29562ed61ea42e46c86cef919f27033f6b3427b0 (diff) |
feat: Add missing mod.ts files in std (#3509)
std/archive/tar.ts:
- Remove FileReader.
- Remove FileWriter.
std/encoding/csv.ts:
- ExtendedParseOptions -> ParseOptions
- HeaderOption -> HeaderOptions
- ParseOptions -> ReadOptions
- readAll() -> readMatrix()
std/encoding/yaml.ts:
- DumpOptions -> StringifyOptions
std/fmt/colors.ts:
- getEnabled() -> getColorEnabled()
- setEnabled() -> setColorEnabled()
std/testing/mod.ts:
- Re-export sibling modules.
Diffstat (limited to 'std/manual.md')
-rw-r--r-- | std/manual.md | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/std/manual.md b/std/manual.md index ca4a269f6..b99c8f28f 100644 --- a/std/manual.md +++ b/std/manual.md @@ -533,8 +533,11 @@ browser JavaScript, Deno can import libraries directly from URLs. This example uses a URL to import a test runner library: ```ts -import { test, runIfMain } from "https://deno.land/std/testing/mod.ts"; -import { assertEquals } from "https://deno.land/std/testing/asserts.ts"; +import { + assertEquals, + runIfMain, + test +} from "https://deno.land/std/testing/mod.ts"; test(function t1() { assertEquals("hello", "hello"); @@ -597,13 +600,15 @@ everywhere in a large project?** The solution is to import and re-export your external libraries in a central `deps.ts` file (which serves the same purpose as Node's `package.json` file). For example, let's say you were using the above testing library across a large project. Rather than importing -`"https://deno.land/std/testing/mod.ts"` and -`"https://deno.land/std/testing/asserts.ts"` everywhere, you could create a +`"https://deno.land/std/testing/mod.ts"` everywhere, you could create a `deps.ts` file that exports the third-party code: ```ts -export { runTests, test } from "https://deno.land/std/testing/mod.ts"; -export { assertEquals } from "https://deno.land/std/testing/asserts.ts"; +export { + assertEquals, + runTests, + test +} from "https://deno.land/std/testing/mod.ts"; ``` And throughout the same project, you can import from the `deps.ts` and avoid |